forked from gogs/go-gogs-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Issue Labels
lstahlman edited this page Jul 20, 2016
·
1 revision
GET /repos/:owner/:repo/issues/:index/labels
Status: 200 OK
Content-Type: application/json
[
{
"id": 5,
"name": "Feature Request",
"color": "#0052cc"
},
{
"id": 6,
"name": "Help Wanted",
"color": "#006b75"
}
]
Only users with write access to a repository can add labels to issues.
POST /repos/:owner/:repo/issues/:index/labels
Name | Type | Description |
---|---|---|
labels | int array | Required Array of label IDs |
{
"labels": [1,6]
}
Status: 200 OK
Content-Type: application/json
[
{
"id": 1,
"name": "Bug",
"color": "#e11d21"
},
{
"id": 5,
"name": "Feature Request",
"color": "#0052cc"
},
{
"id": 6,
"name": "Help Wanted",
"color": "#006b75"
}
]
Only users with write access to a repository can replace labels on an issue.
PATCH /repos/:owner/:repo/issues/:index/labels
Same as adding labels to an issue
Status: 200 OK
Content-Type: application/json
[
{
"id": 1,
"name": "Bug",
"color": "#e11d21"
},
{
"id": 6,
"name": "Help Wanted",
"color": "#006b75"
}
]
Only users with write access to a repository can remove labels on an issue.
DELETE /repos/:owner/:repo/issues/:index/labels/:id
Same as adding labels to an issue.
Status: 204 No Content
Only users with write access to a repository can remove labels on an issue.
DELETE /repos/:owner/:repo/issues/:index/labels/
Status: 204 No Content