Fix --job argument interpreted as --job-token#1957
Closed
meteozond wants to merge 1 commit intopython-gitlab:mainfrom
Closed
Fix --job argument interpreted as --job-token#1957meteozond wants to merge 1 commit intopython-gitlab:mainfrom
--job argument interpreted as --job-token#1957meteozond wants to merge 1 commit intopython-gitlab:mainfrom
Conversation
Member
|
Thanks for the PR @meteozond! could you amend your commit message and force push again? (see CI failure) That is really odd behavior with |
Member
|
Hi @meteozond I'm happy to merge this, just needs a few steps on your end to get green CI: pip install tox # if you don't have tox
tox -e black
git add gitlab/
git commit --amend -m "fix(cli): change default `allow_abbrev` value to avoid argument collision"
git push -fLet me know if you need any more help. |
Member
|
Thanks @meteozond for the fix. Your commit will be included in #2013 to get this merged :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the problem, including code/CLI snippet
--jobargument interpreted as--job-tokenarugment and conflicts with--private-tokenExecuting:
Expected Behavior
Artifact downloaded
Actual Behavior
gitlab: error: argument --job-token: not allowed with argument --private-tokenSpecifications
PS
Looks like it happens because of default
argparse.ArgumentParsersallow_abbrevbehaviour - both--joband--job-tokenstarts with--jobchars.Could be fixed here with:
parser = argparse.ArgumentParser( add_help=add_help, description="GitLab API Command Line Interface", + allow_abbrev=False )