File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff line change 1+ # Behind Upstream
2+
3+ This handler checks if a PR is based on an * X* days old commit.
4+
5+ ## Context
6+
7+ When a PR's code is based on a very old commit from an upstream branch:
8+ It passes when tested locally, but fails when the PR is submitted for testing through CI.
9+
10+ This is because the CI applies the commit patches to the current upstream branch,
11+ which may have new test cases, so it won't pass. We need to rebase the PR to the nearest upstream branch.
12+
13+ ## Configuration
14+
15+ > The default threshold is currently set at ** 7 days** .
16+
17+ This feature is enabled on a repository by having a ` [behind-upstream] ` table in ` triagebot.toml ` :
18+
19+ ``` toml
20+ [behind-upstream ]
21+ ```
22+ or, you can set the day threshold,
23+ ``` toml
24+ [behind-upstream ]
25+ days-threshold = 7
26+ ```
27+
28+ ## Implementation
29+
30+ See [ ` src/handlers/check_commits/behind_upstream.rs ` ] ( https://github.com/rust-lang/triagebot/blob/HEAD/src/handlers/check_commits/behind_upstream.rs ) .
You can’t perform that action at this time.
0 commit comments