github: tweak how mergify rules handle aged PRs #296
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, the mergify rules tried to define a window of time where contributions from maintainers would not sit indefinitely waiting for two reviews (as the maintainer contributing the patch might normally be the one reviewing these things). Instead, we added a short cut where a single review on a maintainer's PR would be auto merged after 15 days. Unfortunately, this approach didn't take into account the fact that reacting to feedback and pushing new patches "resets" the 'updated-at' timer.
This change adds a new mergify rule to label any non-draft PR that has been sitting unchanged for the 15 day window. If this label is applied to a PR from a maintainer and the PR has one approving review the auto merge will be initiated. This has a nice side benefit that the label can be applied to important bugfixes manually to accelerate them. Non-maintainer contributions will not automerge because of the label but it can be used to help reviewers decide what to look at first. This label can also be removed manually in the case the submitter or reviewer decides that, for example, an update to the PR was big enough to warrant resetting the time window or requiring two reviews.
Idea based on the discussion in:
Mergifyio/mergify#5036