GET /repos/:username/:reponame/labels
Status: 200 OK
[
{
"id": 3,
"name": "feature",
"color": "#70c24a"
},
{
"id": 4,
"name": "bug",
"color": "#e11d21"
},
{
"id": 5,
"name": "enhancement",
"color": "#207de5"
}
]
GET /repos/:username/:reponame/labels/:id
Status: 200 OK
{
"id": 3,
"name": "feature",
"color": "#70c24a"
}
POST /repos/:username/:reponame/labels
| Name | Type | Description |
|---|
| name | string | Required The name of the label |
| color | string | Required A 7 character hex code with the leading #, identifying the color |
{
"name": "something",
"color": "#123123"
}
Status: 201 Created
{
"id": 7,
"name": "something",
"color": "#123123"
}
PATCH /repos/:username/:reponame/labels/:id
| Name | Type | Description |
|---|
| name | string | The name of the label |
| color | string | A 7 character hex code with the leading #, identifying the color |
DELETE /repos/:username/:reponame/labels/:id
Status: 204 No Content
GET /repos/:username/:reponame/issues/:index/labels
Status: 200 OK
[
{
"id": 3,
"name": "feature",
"color": "#70c24a"
},
{
"id": 4,
"name": "bug",
"color": "#e11d21"
},
{
"id": 5,
"name": "enhancement",
"color": "#207de5"
}
]
POST /repos/:username/:reponame/issues/:index/labels
{
"labels": [3,4]
}
Status: 200 OK
[
{
"id": 3,
"name": "feature",
"color": "#70c24a"
},
{
"id": 4,
"name": "bug",
"color": "#e11d21"
},
{
"id": 5,
"name": "enhancement",
"color": "#207de5"
}
]
DELETE /repos/:username/:reponame/issues/:index/labels/:id
Status: 204 No Content
PUT /repos/:username/:reponame/issues/:index/labels
{
"labels": [5,6]
}
Status: 200 OK
[
{
"id": 5,
"name": "enhancement",
"color": "#207de5"
},
{
"id": 6,
"name": "feature",
"color": "#70c24a"
}
]
DELETE /repos/:username/:reponame/issues/:index/labels
Status: 204 No Content