Skip to content

Commit b3885ad

Browse files
committed
Add docs about automatic backport nomination
1 parent 8738bb7 commit b3885ad

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+
# Nominate 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][backports]). The decision to backport a patch is quickly skimmed by the relevant team and either accepted or declined.
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+
When configured in the `triagebot.toml`, the triagebot will scan every new patch in the git repository looking 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 a `regression-from-*` label, the triagebot will open a new Zulip discussion topic.
8+
9+
[regression-beta]: https://github.com/rust-lang/rust/issues?q=is%3Aissue%20label%3Aregression-from-stable-to-beta
10+
[backports]: https://forge.rust-lang.org/compiler/backports.html#backports
11+
[zulip-chat]: https://forge.rust-lang.org/platforms/zulip.html
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 scanning is enabled on a repository by with at least one `[backport.<foo>]` table in `triagebot.toml`. There can be multiple occurrence of this configuration to handle different cases:
18+
19+
```toml
20+
[backport.foo]
21+
required-pr-labels = ["T-compiler"]
22+
required-issue-labels = "regression-from-stable-to-beta"
23+
add-labels= ["beta-nominated"]
24+
25+
[backport.bar]
26+
required-pr-labels = ["T-compiler"]
27+
required-issue-labels = "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-labels = "regression-from-stable-to-stable"
33+
add-labels= ["stable-nominated"]
34+
```
35+
36+
`foo`, `bar`, `baz` are just examples of unique identifiers to disambiguate them.
37+
38+
Explaination:
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)