-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add mergify configuration #42
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
pull_request_rules: | ||
- name: automatic merge | ||
conditions: | ||
- and: &base_checks | ||
- base=master | ||
- -label~=^acceptance-tests-needed|not-ready | ||
# wait explicitly for one of the final checks to show up to be on the | ||
# safe side even in case of checks not reporting back at all | ||
- "check-success~=🐪 Perl" | ||
# we don't need to spell out all tests but we can check a minimum | ||
# amount | ||
- "#check-success=>6" | ||
- "#check-failure=0" | ||
- "#check-pending=0" | ||
- linear-history | ||
- and: | ||
- "#approved-reviews-by>=2" | ||
- "#changes-requested-reviews-by=0" | ||
# https://doc.mergify.io/examples.html#require-all-requested-reviews-to-be-approved | ||
- "#review-requested=0" | ||
actions: &merge | ||
merge: | ||
method: merge | ||
- name: automatic merge on special label | ||
conditions: | ||
- and: *base_checks | ||
- and: | ||
# mergify config checks needs at least two rules in "and" so we repeat | ||
# one from the base checks | ||
- base=master | ||
- "label=merge-fast" | ||
Comment on lines
+25
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this really needed here? I mean for now fast merge makes sense, but in the future shuld be removed right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, the difference to the first rule is merely that we don't want to await approval from multiple persons. So for example for a urgent security fix or bugfix that you create I would set that label and as soon as all other checks have passed then mergify would merge regardless of the number of approvals. But I can give that label while tests are still running. mergify will still await successful tests before merging. |
||
actions: *merge | ||
- name: ask to resolve conflict | ||
conditions: | ||
- conflict | ||
actions: | ||
comment: | ||
message: This pull request is now in conflicts. Could you fix it? 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make it, so that it's the entire workflow?. Checking, only a few doesn't sound too reassuring to me. Still with two reviewers approving, should't be the end of the world.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I don't need to include all as we also check that none failed. So we basically only need to cover any potential short "racy" time where some checks would have succeeded already but others did not yet even show up as pending. Likely this can not even happen as long as we only have github actions. This would e.g. only apply for something external like travisCI or circleCI which would report back with a pending status only after some seconds or even minutes