Skip to content

Commit

Permalink
fix(cli): don't require --id when enabling a deploy key
Browse files Browse the repository at this point in the history
No longer require `--id` when doing:
  gitlab project-key enable

Now only the --project-id and --key-id are required.
  • Loading branch information
JohnVillalovos committed May 20, 2024
1 parent f0c16e4 commit 1f8a071
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gitlab/v4/objects/deploy_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class ProjectKeyManager(CRUDMixin, RESTManager):
_create_attrs = RequiredOptional(required=("title", "key"), optional=("can_push",))
_update_attrs = RequiredOptional(optional=("title", "can_push"))

@cli.register_custom_action(cls_names="ProjectKeyManager", required=("key_id",))
@cli.register_custom_action(
cls_names="ProjectKeyManager", required=("key_id",), requires_id=False
)
@exc.on_http_error(exc.GitlabProjectDeployKeyError)
def enable(
self, key_id: int, **kwargs: Any
Expand Down

0 comments on commit 1f8a071

Please sign in to comment.