Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 2.33 KB

File metadata and controls

65 lines (52 loc) · 2.33 KB

Configuring repository labels

You can use the REST API to manage labels for a repository and add or remove labels to issues and pull requests. Every pull request is an issue, but not every issue is a pull request. For this reason, "shared" actions for both features, like managing assignees, labels, and milestones, are provided within the Issues endpoints.

Note

This section can be applied to repos/<file>.yml or suborgs/<file>.yml. It will most commonly appear in the individual repos though.

Example label definition

# These settings are synced to GitHub by https://github.com/github/safe-settings
labels:
  - name: bug
    color: CC0000
    description: An issue with the system

Team API Spec

Tip

GitHub's API documentation defines these inputs and types:

  1. Create a label
  2. Update a label
  3. Delete a label

namestring${\text{\color{orange}Required}}$

The 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 🍓. For a full list of available emoji and codes, see "Emoji cheat sheet."

labels:
  - name: bug
...

colorstring

The hexadecimal color code for the label, without the leading #.

labels:
  - name: bug
    color: CC0000
...

descriptionstring

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

labels:
  - name: bug
    description: Something isn't working
...