Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): don't require --id when enabling a deploy key #2859

Merged
merged 6 commits into from May 22, 2024

Conversation

JohnVillalovos
Copy link
Member

No longer require --id when doing:
gitlab project-key enable

Now only the --project-id and --key-id are required.

@JohnVillalovos JohnVillalovos marked this pull request as draft May 10, 2024 03:55
@JohnVillalovos JohnVillalovos marked this pull request as ready for review May 10, 2024 04:02
@JohnVillalovos JohnVillalovos force-pushed the jlvillal/custom_actions branch 6 times, most recently from 7cf32f9 to 00bba45 Compare May 17, 2024 14:50
@JohnVillalovos
Copy link
Member Author

Hi @nejch

Maybe there is a simpler way to do this.

As an FYI. I have the idea, as a follow-up, to add a help argument to the CustomAction and register_custom_action to enable adding help text to commands if desired

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nejch

Maybe there is a simpler way to do this.

As an FYI. I have the idea, as a follow-up, to add a help argument to the CustomAction and register_custom_action to enable adding help text to commands if desired

I took a look and looks like the best way to do it. I can't think of another way since custom actions can be really different sometimes 🙇 Just 2 nits from my side as it's a big PR but good to go otherwise!

gitlab/cli.py Outdated Show resolved Hide resolved
gitlab/cli.py Outdated Show resolved Hide resolved
@JohnVillalovos JohnVillalovos requested a review from nejch May 20, 2024 21:40
@JohnVillalovos JohnVillalovos force-pushed the jlvillal/custom_actions branch 3 times, most recently from 4434a60 to e08545a Compare May 21, 2024 16:47
This makes it more obvious when reading the code what each argument is
for.
This adds the `.git-blame-ignore-revs` file which allows ignoring
certain commits when doing a `git blame --ignore-revs`

Ignore the commit that requires keyword arguments for
`register_custom_action()`

https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
In some cases we don't want to have `_id_attr` as an argument.

Add ability to have it not be added as an argument.
No longer require `--id` when doing:
  gitlab project-key enable

Now only the --project-id and --key-id are required.
.git-blame-ignore-revs Outdated Show resolved Hide resolved
@nejch nejch enabled auto-merge (rebase) May 22, 2024 14:16
@JohnVillalovos JohnVillalovos enabled auto-merge (rebase) May 22, 2024 14:32
@JohnVillalovos JohnVillalovos merged commit d0fd5ad into main May 22, 2024
16 checks passed
@JohnVillalovos JohnVillalovos deleted the jlvillal/custom_actions branch May 22, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants