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

Conversation

phlogistonjohn
Copy link
Collaborator

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

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

Signed-off-by: John Mulligan <[email protected]>
@phlogistonjohn phlogistonjohn force-pushed the jjm-tweak-mergify-age-rules branch from 28a7a0b to f5120aa Compare March 31, 2023 15:19
Copy link
Collaborator

@synarete synarete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@phlogistonjohn phlogistonjohn merged commit d2e5577 into samba-in-kubernetes:master Apr 2, 2023
@phlogistonjohn phlogistonjohn deleted the jjm-tweak-mergify-age-rules branch April 4, 2023 20:29
@mergify mergify bot added the priority-review This PR deserves a look label Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-review This PR deserves a look
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants