You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
0 commit comments