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.
# These settings are synced to GitHub by https://github.com/github/safe-settings
labels:
include:
- name: bug
color: CC0000
description: An issue with the system
exclude:
# don't delete any labels that start with "release"
- name: ^releaseTip
GitHub's API documentation defines these inputs and types:
|
The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing |
labels:
- name: bug
... |
|
The hexadecimal color code for the label, without the leading |
labels:
- name: bug
color: CC0000
... |
|
A short description of the label. Must be 100 characters or fewer. |
labels:
- name: bug
description: Something isn't working
... |