This is a CLI that helps you use the Gitlab API.
You can install the package via composer:
composer create-project --prefer-dist axeldotdev/gitlab-cli gitlab-cli
https://docs.gitlab.com/ee/api/api_resources.html
You need to run the commands below in a Git repository.
You need to generate an access token on Gitlab to use the API.
To create a new access token, go to your access tokens section on GitLab (or the equivalent URL on your private instance) and create a new token. See also the GitLab access token documentation for more informations.
When you have your personal access token, add it to your composer global auth.json
. See also The Composer authentification documentation for more informations.
Currently this package only works with Gitlab cloud. If you have a self-hosted Gitlab instance, you need to wait next release, I'm sorry.
WORK IN PROGRESS
Then you can register it with the command: gitlab-cli register:token {personal_token}
If you have a self-hosted Gitlab, you can register it with the command: gitlab-cli register:host {host_uri}
TODO
TODO
TODO
gitlab-cli issue:reopen {issue_iid}
# gitlab-cli issue:reopen 345
gitlab-cli issue:close {issue_iid}
# gitlab-cli issue:close 345
gitlab-cli issue:browse {issue_iid}
# gitlab-cli issue:browse 345
Only works on macOS
gitlab-cli issue:label:add {issue_iid} {label_names}
# gitlab-cli issue:label:add 345 todo,bug,auth
gitlab-cli issue:label:remove {issue_iid} {label_names}
# gitlab-cli issue:label:remove 345 todo,bug,auth
gitlab-cli issue:label:add {issue_iid} {old_label_names} {new_label_names}
# gitlab-cli issue:label:add 345 todo testing
gitlab-cli issue:milestone:link {issue_iid} {milestone_iid}
# gitlab-cli issue:milestone:link 345 25
gitlab-cli issue:milestone:unlink {issue_iid} {milestone_iid}
# gitlab-cli issue:milestone:unlink 345 25
gitlab-cli issue:epic:link {issue_iid} {milestone_iid}
# gitlab-cli issue:epic:link 345 25
gitlab-cli issue:epic:unlink {issue_iid} {milestone_iid}
# gitlab-cli issue:epic:unlink 345 25
TODO
TODO
TODO
TODO
TODO
TODO
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.