Skip to content

Commit 2b4741d

Browse files
github: sync mergify rules that handle aged PRs
In samba-operator we updated the mergify rules to label PRs that are "old", applying a "priority-review" label to the PR. See the samba-operator commit d2e55778920d3ab0bfd9c7f820fe5b1f2b9de4e4 for full details. Signed-off-by: John Mulligan <[email protected]>
1 parent bc579c9 commit 2b4741d

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/mergify.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ pull_request_rules:
4848
- or:
4949
# Any contributor's PR can be automerged with 2 (or more) reviews.
5050
- "#approved-reviews-by>=2"
51-
# A maintainer's contribution only needs 1 review BUT we give a grace
52-
# period over just two weeks for a 2nd reviewer to hopefully appear.
51+
# A maintainer's contribution that has already aged long enough to
52+
# earn the "priority-review" label can be merged immediately.
53+
# The label can also be applied manually in case of an important
54+
# bugfix, etc.
5355
- and:
54-
- "updated-at<15 days ago"
56+
- "label=priority-review"
5557
- "author=@maintainers"
5658
- "#approved-reviews-by>=1"
5759
actions:
@@ -65,3 +67,17 @@ pull_request_rules:
6567
comment:
6668
message: "This pull request now has conflicts with the target branch.
6769
Please resolve these conflicts and force push the updated branch."
70+
# Label PRs that have been sitting there unchanged, aging like a fine wine
71+
#
72+
# NOTE: the updated-at "counter" resets every time the PR is changed so
73+
# reacting to a reviewer's feedback and fixing a typo (for example) will
74+
# reset the counter. Thus we now apply a label once we hit the 15 day window
75+
# so that we know that PR had, at some time, sat unchanged for that long.
76+
- name: Label aged PRs
77+
conditions:
78+
- "updated-at<15 days ago"
79+
- "-draft"
80+
actions:
81+
label:
82+
add:
83+
- "priority-review"

0 commit comments

Comments
 (0)