Skip to content

Commit 201e18f

Browse files
authored
Merge pull request #914 from apiraino/add-docs-for-automatic-backport-nomination
Add docs about automatic backport nomination
2 parents 16c1a06 + 6e87ed7 commit 201e18f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [Issue Assignment](./triagebot/issue-assignment.md)
1818
- [PR Assignment](./triagebot/pr-assignment.md)
1919
- [Review queue tracking](triagebot/review-queue-tracking.md)
20+
- [Backport nomination](./triagebot/backport.md)
2021
- [Autolabels](./triagebot/autolabels.md)
2122
- [Behind Upstream](./triagebot/behind-upstream.md)
2223
- [Canonicalize Issue Links](./triagebot/canonicalize-issue-links.md)

src/triagebot/backport.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Automatic nomination of pull requests for backport
2+
3+
When a [regression][regression-beta] for the compiler or the standard library (or any other component) is fixed, we evaluate whether to backport the patch to the release channel where it originated (beta or stable, see [backports]). The relevant team looks at the fix and either accepts or declines the backport.
4+
5+
In order to give more visibility to patches fixing important regressions and facilitate the team taking a decision, a discussion topic on our [Zulip chat][zulip-chat] can be automatically opened ([example][zulip-backport-poll]).
6+
7+
Automatic nomination of pull requests for backport can be configured to scan every new patch in the git repository and look for a text marker in the opening comment (example "Fixes #123", see [GitHub documentation][gh-assoc-issue-patched]). If such text is found and the issue being fixed is classified as `P-high` or `P-critical` and has one of the `required-issue-label` labels (e.g. `regression-from-*`), the handler will apply the configured `add-labels` labels.
8+
9+
[regression-beta]: https://github.com/rust-lang/rust/issues?q=is%3Aissue%20label%3Aregression-from-stable-to-beta
10+
[backports]: ../compiler/backports.md#backports
11+
[zulip-chat]: ../platforms/zulip.md
12+
[zulip-backport-poll]: https://rust-lang.zulipchat.com/#narrow/channel/474880-t-compiler.2Fbackports/topic/.23143509.3A.20beta-nominated/with/527517416
13+
[gh-assoc-issue-patched]: https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-issues/linking-a-pull-request-to-an-issue
14+
15+
## Configuration
16+
17+
The automatic backport labelling is enabled on a repository when at least one `[backport.<foo>]` table is configured in `triagebot.toml`:
18+
19+
```toml
20+
[backport.foo]
21+
required-pr-labels = ["T-compiler"]
22+
required-issue-label = "regression-from-stable-to-beta"
23+
add-labels = ["beta-nominated"]
24+
25+
[backport.bar]
26+
required-pr-labels = ["T-compiler"]
27+
required-issue-label = "regression-from-stable-to-stable"
28+
add-labels = ["beta-nominated", "stable-nominated"]
29+
30+
[backport.baz]
31+
required-pr-labels = ["T-libs", "T-libs-api"]
32+
required-issue-label = "regression-from-stable-to-stable"
33+
add-labels = ["stable-nominated"]
34+
```
35+
36+
`foo`, `bar`, `baz` are examples of unique identifiers to disambiguate them, they can be anything.
37+
38+
Fields explanation:
39+
- `required-pr-labels`: a list of labels that the pull request must have when it is opened (suggested to use a team label `T-*`)
40+
- `required-issue-label`: a label that the regression must have in order to be identified as such. It can be one of: `regression-from-stable-to-nightly`, `regression-from-stable-to-beta` or `regression-from-stable-to-stable`.
41+
- `add-labels`: a list of labels that the pull request will be assigned, if all conditions apply.
42+
43+
## Implementation
44+
45+
See [`src/handlers/backport.rs`](https://github.com/rust-lang/triagebot/blob/HEAD/src/handlers/backport.rs).

0 commit comments

Comments
 (0)