-
Notifications
You must be signed in to change notification settings - Fork 77
Autolabels
Eric Huss edited this page Oct 26, 2022
·
3 revisions
Auto labels will automatically apply labels to issues and PRs based on the [autolabel]
configuration in triagebot.toml
.
Labels can be added when another label is added. The trigger_labels
config option specifies which labels will cause this to trigger.
# Automatically applies the `I-prioritize` label whenever one of the labels
# listed below is added to an issue (unless the issue already has one of the
# labels listed in `exclude_labels`).
[autolabel."I-prioritize"]
trigger_labels = [
"regression-untriaged",
"regression-from-stable-to-stable",
"regression-from-stable-to-beta",
"regression-from-stable-to-nightly",
"I-unsound",
]
exclude_labels = [
"P-*",
"T-infra",
"T-release",
"requires-nightly",
]
Exclude labels support shell-like *
glob patterns.
Labels can be added based on which files are modified in a PR. The trigger_files
config option specifies which files will cause the label to be added. Paths are matched with starts_with
.
# Adds the `T-compiler` label to any PR that touches `compiler` or
# `src/test/ui` unless it already has a `T-*` label.
[autolabel."T-compiler"]
trigger_files = [
"compiler",
"src/test/ui",
]
exclude_labels = [
"T-*",
]
Labels can be added to any PR when it is opened. Set the new_pr = true
config option to enable this. For example:
[autolabel."S-waiting-on-review"]
new_pr = true