curl --location --request POST 'https://api.github.com/repos///issues//labels' \
--header 'Content-Type: application/json' \
--data-raw '{
"labels": [
"bug",
"enhancement"
]
}'
[
{
"color": "FFFFFF",
"default": true,
"description": "Something isn't working",
"id": 208045946,
"name": "bug",
"node_id": "MDU6TGFiZWwyMDgwNDU5NDY=",
"url": "https://api.github.com/repositories/42/labels/bug"
}
]
string
or an array
of labels directly, but GitHub recommends passing an object with the labels
key. You can also replace all of the labels for an issue. For more information, see "Set labels for an issue."