README ¶
go-gitlab-client
##This repository fork https://github.com/plouc/go-gitlab-client/
go-gitlab-client is a client written in golang to consume gitlab API.
lib
Install lib
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"
)
Update
To update go-gitlab-client
, use go get -u
:
go get -u github.com/plouc/go-gitlab-client/gitlab
Documentation
Visit the docs at http://godoc.org/github.com/plouc/go-gitlab-client/gitlab
Supported APIs
Branches
- List repository branches
- Get single repository branch
- Protect repository branch
- Unprotect repository branch
- Create repository branch
- Delete repository branch
- Delete merged branches
Project-level variables
- List project variables
- Show project variable details
- Create project variable
- Update project variable
- Remove project variable
Group-level variables
- List group variables
- Show group variable details
- Create group variable
- Update group variable
- Remove group variable
Commits
- 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
Deploy Keys
- list project deploy keys
- add/get/rm project deploy key
Environments
- List environments
- Create a new environment
- Edit an existing environment
- Delete an environment
- Stop an environment
Groups
- 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
Jobs
- 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
Projects
- List all projects
- List user projects
- Get single project
- Remove project
- Star a project
- Unstar a project
Repositories
- list project repository tags
- list repository commits
- list project hooks
- add/get/edit/rm project hook
Users
- List users
- Single user
- Current user
SSH Keys
- 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
Runners
- 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
Project hooks
- List project hooks
- Get project hook
- Add project hook
- Edit project hook
- Delete project hook
Pipelines
- List project pipelines
- Get a single pipeline
- Create a new pipeline
- Retry jobs in a pipeline
- Cancel a pipeline's jobs
Project badges
- 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
Namespaces
- List namespaces
- Search for namespace
- Get namespace by ID
Merge requests
- 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
Notes
- 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
Click to show internal directories.
Click to hide internal directories.