Commit 1291dbb5 authored by John L. Villalovos's avatar John L. Villalovos Committed by Nejc Habjan
Browse files

chore: add a help message for `gitlab project-key enable`

Add some help text for `gitlab project-key enable`. This both adds
help text and shows how to use the new `help` feature.

Example:

$ gitlab project-key --help
usage: gitlab project-key [-h] {list,get,create,update,delete,enable} ...

options:
  -h, --help            show this help message and exit

action:
  {list,get,create,update,delete,enable}
                        Action to execute on the GitLab resource.
    list                List the GitLab resources
    get                 Get a GitLab resource
    create              Create a GitLab resource
    update              Update a GitLab resource
    delete              Delete a GitLab resource
    enable              Enable a deploy key for the project
parent 9acd2d23
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -37,7 +37,10 @@ class ProjectKeyManager(CRUDMixin, RESTManager):
    _update_attrs = RequiredOptional(optional=("title", "can_push"))

    @cli.register_custom_action(
        cls_names="ProjectKeyManager", required=("key_id",), requires_id=False
        cls_names="ProjectKeyManager",
        required=("key_id",),
        requires_id=False,
        help="Enable a deploy key for the project",
    )
    @exc.on_http_error(exc.GitlabProjectDeployKeyError)
    def enable(