node-gitlab-client
Available operations
-
- List project builds
getProjectBuilds()
- List commit builds
getProjectRepositoryCommitBuilds()
- Get a single build
getProjectBuild()
- Get build artifacts
getProjectBuildArtifacts()
- Cancel a build
addProjectBuildCancel()
- Retry a build
addProjectBuildRetry()
- Erase a build
addProjectBuildErase()
- List project builds
-
- List labels
getProjectLabels()
- Create a new label
addProjectLabel()
- Delete a label
deleteProjectLabels()
- Edit an existing label
updateProjectLabels()
- List labels
-
- List projects
getProjects()
- List owned projects
getProjectsOwned()
- List starred projects
getProjectsStarred()
- List ALL projects
getProjectsAll()
- Get single project
getProject()
- Get project events
getProjectEvents()
- Create project
addProject()
- Create project for user
addProjectsUser()
- Edit project
updateProject()
- Fork project
addProjectsFork()
- Remove project
deleteProject()
- Upload a file
addProjectUpload()
- List project team members
getProjectMembers()
- Get project team member
getProjectMember()
- Add project team member
addProjectMember()
- Edit project team member
updateProjectMember()
- Remove project team member
deleteProjectMember()
- Share project with group
addProjectShare()
- List project hooks
getProjectHooks()
- Get project hook
getProjectHook()
- Add project hook
addProjectHook()
- Edit project hook
updateProjectHook()
- Delete project hook
deleteProjectHook()
- List branches
getProjectRepositoryBranches()
- List single branch
getProjectRepositoryBranch()
- Protect single branch
updateProjectRepositoryBranchProtect()
- Unprotect single branch
updateProjectRepositoryBranchUnprotect()
- Create a forked from/to relation between existing projects.
addProjectFork()
- Delete an existing forked from relationship
deleteProjectFork()
- Search for projects by name
getProjectsSearch()
- List projects
-
- List project repository tags
getProjectRepositoryTags()
- Create a new tag
addProjectRepositoryTag()
- Delete a tag
deleteProjectRepositoryTag()
- Create a new release
addProjectRepositoryTagRelease()
- Update a release
updateProjectRepositoryTagRelease()
- List project repository tags
Usage
import labelsApi from 'gitlab-client/labels';
// init labels api client
const labels = labelsApi({
apiBaseUrl: 'https://gitlab.example.com/api/v3',
token: 'my_secret_token'
});
// fetch project 123 labels
labels.getProjectLabels(123)
.then(function (res) {
console.log(res.body);
})
.catch(console.error)
;