summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2019-02-13 22:51:53 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2019-08-26 10:45:37 +0200
commit41412f73604159ca735420396df73f7b6eef6f86 (patch)
tree64bac28e7e965699707331301995801fb5b6d330 /doc
parent2e83665ed30259a7908350d316605a9c100f0876 (diff)
downloadgitlab-ce-41412f73604159ca735420396df73f7b6eef6f86.tar.gz
Add docs and first specs
Diffstat (limited to 'doc')
-rw-r--r--doc/api/labels.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/api/labels.md b/doc/api/labels.md
index fde1d861cf6..9b640a0203d 100644
--- a/doc/api/labels.md
+++ b/doc/api/labels.md
@@ -186,6 +186,40 @@ Example response:
}
```
+## Promote a project label to a group label
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25218) in GitLab 11.9.
+
+Promotes a project label to a group label.
+
+```
+POST /projects/:id/labels/promote
+```
+
+| Attribute | Type | Required | Description |
+| --------------- | ------- | --------------------------------- | ------------------------------- |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
+| `name` | string | yes | The name of the existing label |
+
+```bash
+curl --request POST --data "name=documentation" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/labels/promote"
+```
+
+Example response:
+
+```json
+{
+ "id" : 8,
+ "name" : "documentation",
+ "color" : "#8E44AD",
+ "description": "Documentation",
+ "open_issues_count": 1,
+ "closed_issues_count": 0,
+ "open_merge_requests_count": 2,
+ "subscribed": false
+}
+```
+
## Subscribe to a label
Subscribes the authenticated user to a label to receive notifications.