This repository was archived by the owner on Jul 1, 2024. It is now read-only.
Commit dcb5a84
committed
Revise staleness timelines and timeline handling
* `staleness` is now an optional object with fields for the
`state` (fresh / attention / nearly / done) `kind` (which is also the
label that will be applied when the timeline is done), and `days` for
the count (replacing `stalenessInDays`). It's `undefined` when we're
not on any of the timelines.
* Shuffle the code so staleness handling is used in the same place
regardless of other state. Note that it's done regardless of other
actions which leads to some changes test in tests, but in practice it
shouldn't be a problem (unless the bot dies for many days).
* The `Staleness` generation becomes the place for configuring staleness
timelines, together with mappings in `comments.ts` for the explanation
and comments of various states.
* Added the `Unreviewed` kind --- changed the 44857 test to use it
instead of `Abandoned`.
* Staleness also has a `doTimelineActions` which is now the central
place for doing all timeline-related actions.
* Change: the stalness comment tags are computed (in `makeStaleness`),
they depend on the state:
- `nearly`: a tag that includes the date that the countdown started
at, so these comments can be repeated if there's a timeline change
that voided the previous staleness, but a new one triggered.
- `done`: no date in the tag, since these comments are terminal.
* Change: `YSYL` is renamed to `Unmerged`.
* Change: put the `Unmerged`/`Abandoned`/`Unreviewd` label when reaching
`nearly` state, so it is useful to find PRs that are approaching their
terminal (`done`) state.
* Revise the timelines, with some minor changes, and update all comments
accordingly. Notable changes from #208:
- The waits are slightly different, but roughly the same.
- "Becoming mergable" is measured from the merge offer comment when
found.
- The unreviewed timeline counts days from the last update rather than
from the creation time. This because I see a lot of PR's that have
a few days of work following their creation. It could be confusing
if the count starts at creation, since some of these PRs would seem
to be announced unreviewed very quickly.
* Update `docs/how-it-works.md`.
Closes #208
Closes #207
Closes #2041 parent df1a976 commit dcb5a84
File tree
51 files changed
+883
-192
lines changed- docs
- src
- _tests
- fixtures
- 38979
- 43144
- 43695-duplicate-comment
- 44857
- 44989-14days
- 44989-32days
- 44989-3days
- 44989-7days
- 44989-9days
- 45627
- 46804
- 46879
- 48236
- 48708
- 49548
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
51 files changed
+883
-192
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | | - | |
29 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
30 | 39 | | |
31 | | - | |
| 40 | + | |
| 41 | + | |
32 | 42 | | |
33 | | - | |
| 43 | + | |
| 44 | + | |
34 | 45 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 46 | + | |
39 | 47 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | | - | |
45 | 52 | | |
46 | | - | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
| |||
253 | 258 | | |
254 | 259 | | |
255 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
256 | 266 | | |
257 | 267 | | |
258 | 268 | | |
| |||
272 | 282 | | |
273 | 283 | | |
274 | 284 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | 285 | | |
281 | 286 | | |
282 | 287 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
59 | 69 | | |
60 | 70 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
2 | 13 | | |
3 | 14 | | |
4 | 15 | | |
| |||
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
28 | | - | |
| 39 | + | |
29 | 40 | | |
30 | 41 | | |
31 | 42 | | |
| |||
46 | 57 | | |
47 | 58 | | |
48 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
49 | 69 | | |
50 | 70 | | |
0 commit comments