go-gitlab-client is a client written in golang to consume gitlab API.
It also provides an handy CLI to easily interact with gitlab API.
To install go-gitlab-client, use go get
:
go get github.com/plouc/go-gitlab-client/gitlab
Import the go-gitlab-client
package into your code:
package whatever
import (
"github.com/plouc/go-gitlab-client/gitlab"
)
To update go-gitlab-client
, use go get -u
:
go get -u github.com/plouc/go-gitlab-client/gitlab
Visit the docs at http://godoc.org/github.com/plouc/go-gitlab-client/gitlab
- List repository branches
- Get single repository branch
- Protect repository branch
- Unprotect repository branch
- Create repository branch
- Delete repository branch
- Delete merged branches
- List project variables
- Show project variable details
- Create project variable
- Update project variable
- Remove project variable
- List group variables
- Show group variable details
- Create group variable
- Update group variable
- Remove group variable
- List repository commits
- Create a commit with multiple files and actions
- Get a single commit
- Get references a commit is pushed to
- Cherry pick a commit
- Get the diff of a commit
- Get the comments of a commit
- Post comment to commit
- List the statuses of a commit
- Post the build status to a commit
- List Merge Requests associated with a commit
- list project deploy keys
- add/get/rm project deploy key
- List environments
- Create a new environment
- Edit an existing environment
- Delete an environment
- Stop an environment
- List groups
- List a groups's subgroups
- List a group's projects
- Details of a group
- New group
- Transfer project to group
- Update group
- Remove group
- Search for group
- Group members
- List project jobs
- List pipeline jobs
- Get a single job
- Get job artifacts
- Download the artifacts archive
- Download a single artifact file
- Get a trace file
- Cancel a job
- Retry a job
- Erase a job
- Keep artifacts
- Play a job
- List all projects
- List user projects
- Get single project
- Remove project
- Star a project
- Unstar a project
- list project repository tags
- list repository commits
- list project hooks
- add/get/edit/rm project hook
- List users
- Single user
- Current user
- List SSH keys
- List SSH keys for user
- Single SSH key
- Add SSH key
- Add SSH key for user
- Delete SSH key for current user
- Delete SSH key for given user
- List owned runners
- List all runners
- Get runner's details
- Update runner's details
- Remove a runner
- List runner's jobs
- List project's runners
- Enable a runner in project
- Disable a runner from project
- Register a new Runner
- Delete a registered Runner
- Verify authentication for a registered Runner
- List project hooks
- Get project hook
- Add project hook
- Edit project hook
- Delete project hook
- List project pipelines
- Get a single pipeline
- Create a new pipeline
- Retry jobs in a pipeline
- Cancel a pipeline's jobs
- List all badges of a project
- Get a badge of a project
- Add a badge to a project
- Edit a badge of a project
- Remove a badge from a project
- Preview a badge from a project
- List namespaces
- Search for namespace
- Get namespace by ID
- List merge requests
- List project merge requests
- List group merge requests
- Get single MR
- Get single MR participants
- Get single MR commits
- Get single MR changes
- List MR pipelines
- Create MR
- Update MR
- Delete a merge request
- Accept MR
- Cancel Merge When Pipeline Succeeds
- Comments on merge requests
- List issues that will close on merge
- Subscribe to a merge request
- Unsubscribe from a merge request
- Create a todo
- Get MR diff versions
- Get a single MR diff version
- Set a time estimate for a merge request
- Reset the time estimate for a merge request
- Add spent time for a merge request
- Reset spent time for a merge request
- Get time tracking stats
- Approvals
- Issues
- List project issue notes
- Get single issue note
- Create new issue note
- Modify existing issue note
- Delete an issue note
- Snippets
- List all snippet notes
- Get single snippet note
- Create new snippet note
- Modify existing snippet note
- Delete a snippet note
- Merge Requests
- List all merge request notes
- Get single merge request note
- Create new merge request note
- Modify existing merge request note
- Delete a merge request note
- Epics
- List all epic notes
- Get single epic note
- Create new epic note
- Modify existing epic note
- Delete an epic note
go-gitlab-client provides a CLI to easily interact with GitLab API, glc.
glc is a single binary with no external dependencies, released for several platforms.
Go to the releases page,
download the package for your OS, and copy the binary to somewhere on your PATH.
Please make sure to rename the binary to glc
and make it executable.
You can also install completion for bash or zsh, please run glc help completion
for more info.
- normalized operations:
ls
,get
,add
,update
- resource aliases for easy retrieval
text
,yaml
&json
output- saving output to file
- interactive pagination mode
- interactive resource creation