Skip to content

Commit 98fc578

Browse files
fix(cli): don't require --id when enabling a deploy key
No longer require `--id` when doing: gitlab project-key enable Now only the --project-id and --key-id are required.
1 parent 2037352 commit 98fc578

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gitlab/v4/objects/deploy_keys.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ class ProjectKeyManager(CRUDMixin, RESTManager):
3636
_create_attrs = RequiredOptional(required=("title", "key"), optional=("can_push",))
3737
_update_attrs = RequiredOptional(optional=("title", "can_push"))
3838

39-
@cli.register_custom_action(cls_names="ProjectKeyManager", required=("key_id",))
39+
@cli.register_custom_action(
40+
cls_names="ProjectKeyManager", required=("key_id",), requires_id=False
41+
)
4042
@exc.on_http_error(exc.GitlabProjectDeployKeyError)
4143
def enable(
4244
self, key_id: int, **kwargs: Any

0 commit comments

Comments
 (0)