Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix--job argument interpreted as--job-token#1957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

meteozond
Copy link

Description of the problem, including code/CLI snippet

--job argument interpreted as--job-token arugment and conflicts with --private-token

Executing:

gitlab \  --private-token ${GITLAB_API_KEY} -o json \  project-artifact download \  --project-id mdm/entities \  --job ${JOB} \  --ref-name ${REF} \

Expected Behavior

Artifact downloaded

Actual Behavior

gitlab: error: argument --job-token: not allowed with argument --private-token

Specifications

  • python-gitlab version: 3.2.0
  • API version you are using (v3/v4): doesn't meter
  • Gitlab server version (or gitlab.com): doesn't meter

PS

Looks like it happens because of defaultargparse.ArgumentParsersallow_abbrev behaviour - both--job and--job-token starts with--job chars.

Could be fixedhere with:

    parser = argparse.ArgumentParser(        add_help=add_help, description="GitLab API Command Line Interface",+       allow_abbrev=False    )

@nejch
Copy link
Member

Thanks for the PR@meteozond! could you amend your commit message and force push again? (see CI failure)

That is really odd behavior withallow_abbrev TBH 🤔

@nejch
Copy link
Member

nejch commentedApr 27, 2022
edited
Loading

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 toxtox -e blackgit add gitlab/git commit --amend -m"fix(cli): change default`allow_abbrev` value to avoid argument collision"git push -f

Let me know if you need any more help.

@nejch
Copy link
Member

Thanks@meteozond for the fix. Your commit will be included in#2013 to get this merged :)

@nejchnejch closed thisMay 9, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@meteozondmeteozond

Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@meteozond@nejch

[8]ページ先頭

©2009-2025 Movatter.jp