Skip to content

Commit 1266f7b

Browse files
committed
Add doc for triagebot [behind-upstream] handler
Signed-off-by: xizheyin <[email protected]>
1 parent 4aebbc9 commit 1266f7b

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [PR Assignment](./triagebot/pr-assignment.md)
1717
- [Tracking PR assignment](./triagebot/pr-assignment-tracking.md)
1818
- [Autolabels](./triagebot/autolabels.md)
19+
- [Behind Upstream](./triagebot/behind-upstream.md)
1920
- [Canonicalize Issue Links](./triagebot/canonicalize-issue-links.md)
2021
- [Close](./triagebot/close.md)
2122
- [Documentation Updates](./triagebot/doc-updates.md)

src/triagebot/behind-upstream.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Behind Upstream
2+
3+
This is what happens when a PR's code is based on a very old commit from an upstream branch:
4+
It passes when tested locally, but fails when the PR is submitted for testing through CI.
5+
6+
This is because the CI applies the commit patches to the current upstream branch,
7+
which may have new test cases, so it won't pass. We need to rebase the PR to the nearest upstream branch.
8+
9+
This option checks if a PR is based on an older branch upstream.
10+
11+
## Configuration
12+
13+
This feature is enabled on a repository by having a `[behind-upstream]` table in `triagebot.toml`:
14+
15+
```toml
16+
[behind-upstream]
17+
```
18+
or, you can set the day threshold,
19+
```toml
20+
[behind-upstream]
21+
days-threshold = 7
22+
```
23+
24+
## Implementation
25+
26+
See [`src/handlers/check_commits/behind_upstream.rs`](https://github.com/rust-lang/triagebot/blob/HEAD/src/handlers/check_commits/behind_upstream.rs).

0 commit comments

Comments
 (0)