node-gitlab
Advanced tools
Comparing version 1.1.0 to 1.2.0
1.2.0 / 2015-08-26 | ||
================== | ||
* feat: Ability to list project labels | ||
1.1.0 / 2015-06-11 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -51,1 +51,17 @@ /**! | ||
}; | ||
Project.prototype.getLabels = function (params, callback) { | ||
this.client.request('get', this.onePath + '/labels', params, callback); | ||
}; | ||
Project.prototype.createLabel = function (params, callback) { | ||
this.client.request('post', this.onePath + '/labels', params, callback); | ||
}; | ||
Project.prototype.updateLabel = function(params, callback) { | ||
this.client.request('put', this.onePath + '/labels', params, callback); | ||
}; | ||
Project.prototype.deleteLabel = function(params, callback) { | ||
this.client.request('delete', this.onePath + '/labels', params, callback); | ||
}; |
{ | ||
"name": "node-gitlab", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Gitlab API nodejs client.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -359,2 +359,54 @@ gitlab | ||
#### client.projects.getLabels({id}) | ||
Get the labels for the specified project. | ||
Parameters: | ||
- id (required) - The ID or NAMESPACE/PROJECT_NAME of a project | ||
```json | ||
[ | ||
{ "name": "Bug", color: "#A8D695" }, | ||
{ "name": "Feature", color: "#5CB85C" } | ||
] | ||
``` | ||
#### client.projects.createLabel({id, name, color}) | ||
Create a label for the specified project. | ||
Parameters: | ||
- id (required) - The ID of a project | ||
- name (required) - The name of the label | ||
- color (required) - Color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) | ||
```json | ||
[ | ||
{ "name": "Bug", color: "#A8D695" }, | ||
{ "name": "Feature", color: "#5CB85C" } | ||
] | ||
``` | ||
#### client.projects.updateLabel({id, name, new_name, color}) | ||
Update a label for the specified project. | ||
Parameters: | ||
- id (required) - The ID of a project | ||
- name (required) - The name of the existing label | ||
- new_name (optional) - The new name of the label | ||
- color (optional) - New color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) | ||
#### client.projects.deleteLabel({id, name}) | ||
Delete a label for the specified project. | ||
Parameters: | ||
- id (required) - The ID of a project | ||
- name (required) - The name of the label to be deleted | ||
--- | ||
@@ -503,2 +555,32 @@ | ||
#### client.repositoryBranches.create({id, branch_name, ref}) | ||
Create a repository branch on a project. | ||
Parameters: | ||
- id (required) - The ID or NAMESPACE/PROJECT_NAME of a project | ||
- branch_name (required) - The name of the branch. | ||
- ref (required) - Create branch from commit SHA or existing branch. | ||
#### client.repositoryBranches.remove({id, branch}) | ||
Delete repository branch | ||
Parameters: | ||
- id (required) - The ID of a project | ||
- branch (required) - The name of the branch | ||
It return 200 if succeed, 404 if the branch to be deleted does not exist or 400 for other reasons. | ||
In case of an error, an explaining message is provided. | ||
Success response: | ||
```json | ||
{ | ||
"branch_name": "my-removed-branch" | ||
} | ||
``` | ||
#### client.repositoryBranches.protect({id, branch}) | ||
@@ -505,0 +587,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47091
541
1004