Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: tweak how mergify rules handle aged PRs #296

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ pull_request_rules:
- or:
# Any contributor's PR can be automerged with 2 (or more) reviews.
- "#approved-reviews-by>=2"
# A maintainer's contribution only needs 1 review BUT we give a grace
# period over just two weeks for a 2nd reviewer to hopefully appear.
# A maintainer's contribution that has already aged long enough to
# earn the "priority-review" label can be merged immediately.
# The label can also be applied manually in case of an important
# bugfix, etc.
- and:
- "updated-at<15 days ago"
- "label=priority-review"
- "author=@maintainers"
- "#approved-reviews-by>=1"
actions:
Expand All @@ -77,3 +79,17 @@ pull_request_rules:
comment:
message: "This pull request now has conflicts with the target branch.
Please resolve these conflicts and force push the updated branch."
# Label PRs that have been sitting there unchanged, aging like a fine wine
#
# NOTE: the updated-at "counter" resets every time the PR is changed so
# reacting to a reviewer's feedback and fixing a typo (for example) will
# reset the counter. Thus we now apply a label once we hit the 15 day window
# so that we know that PR had, at some time, sat unchanged for that long.
- name: Label aged PRs
conditions:
- "updated-at<15 days ago"
- "-draft"
actions:
label:
add:
- "priority-review"