Skip to main content

Update a label

PATCH/repos/{owner}/{repo}/labels/{name}
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
owner string
required
repo string
required
name string
required
Body Params
optional
application/jsonobject
color string
optional

The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`.

description string
optional

A short description of the label. Must be 100 characters or fewer.

new_name string
optional

The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)."

Responses

application/json Label object

Response

color string
required

6-character hex code, without the leading #, identifying the color

Example: FFFFFF

default boolean
required

Example: true

description string
requirednullable

Example: Something isn't working

id integer<int64>
required

Example: 208045946

name string
required

The name of the label.

Example: bug

node_id string
required

Example: MDU6TGFiZWwyMDgwNDU5NDY=

url string<uri>
required

URL for the label

Example: https://api.github.com/repositories/42/labels/bug