From 41412f73604159ca735420396df73f7b6eef6f86 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Wed, 13 Feb 2019 22:51:53 +0100 Subject: Add docs and first specs --- doc/api/labels.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'doc/api') 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: " "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. -- cgit v1.2.3 From efafc98bd8ca7d4ed4c86f19325eb2aa51edd227 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Thu, 14 Feb 2019 11:40:28 +0100 Subject: Move promote to put and add more specs --- doc/api/labels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/api') diff --git a/doc/api/labels.md b/doc/api/labels.md index 9b640a0203d..21ac8a99965 100644 --- a/doc/api/labels.md +++ b/doc/api/labels.md @@ -193,7 +193,7 @@ Example response: Promotes a project label to a group label. ``` -POST /projects/:id/labels/promote +PUT /projects/:id/labels/promote ``` | Attribute | Type | Required | Description | @@ -202,7 +202,7 @@ POST /projects/:id/labels/promote | `name` | string | yes | The name of the existing label | ```bash -curl --request POST --data "name=documentation" --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/projects/1/labels/promote" +curl --request PUT --data "name=documentation" --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/projects/1/labels/promote" ``` Example response: -- cgit v1.2.3 From e2a7dd3f0aaa767a7b1cb01f69e9b4520ae04b65 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Mon, 26 Aug 2019 10:49:48 +0200 Subject: Update docs targeting 12.3 --- doc/api/labels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/api') diff --git a/doc/api/labels.md b/doc/api/labels.md index 21ac8a99965..9692cc8b710 100644 --- a/doc/api/labels.md +++ b/doc/api/labels.md @@ -188,7 +188,7 @@ 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. +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25218) in GitLab 12.3. Promotes a project label to a group label. -- cgit v1.2.3