forked from gogs/go-gogs-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Labels
lstahlman edited this page Jul 20, 2016
·
3 revisions
GET /repos/:owner/:repo/issues
Status: 200 OK
Content-Type: application/json
[
{
"id": 5,
"name": "Feature Request",
"color": "#0052cc"
},
{
"id": 6,
"name": "Help Wanted",
"color": "#006b75"
}
]
GET /repos/:owner/:repo/issues/:index
Status: 200 OK
Content-Type: application/json
{
"id": 6,
"name": "Help Wanted",
"color": "#006b75"
}
Only users with write access to a repository can create an issue.
POST /repos/:owner/:repo/labels
Name | Type | Description |
---|---|---|
name | string | Required The name of the label |
color | string | Required The label color as a hex value e.g, #006b75 |
{
"name": "Help Wanted",
"color": "#006b75"
}
Status: 201 Created
Content-Type: application/json
{
"id": 6,
"name": "Help Wanted",
"color": "#006b75"
}
Issue owners and users with write access can edit an issue.
PATCH /repos/:owner/:repo/labels/:index
Name | Type | Description |
---|---|---|
name | string | The name of the label |
color | string | The label color as a hex value e.g, #006b75 |
If a parameter is empty, that part of the label will remain unchanged
{
"name": "Help Wanted",
"color": "#006b75"
}
Status: 200 OK
Content-Type: application/json
{
"id": 6,
"name": "Help Wanted",
"color": "#006b75"
}
Only users with write access to a repository can delete labels.
DELETE /repos/:owner/:repo/labels/:id
Status: 204 No Content