Commit 98fc5789 authored by John L. Villalovos's avatar John L. Villalovos Committed by John Villalovos
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.
parent 20373525
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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