Skip to content

Commit 12a5428

Browse files
phlogistonjohnobnoxxx
authored andcommitted
github: add mergify configuration YAML file
Start trying out mergify on sambacc. This is highly borrowed from the go-ceph repo, which in turn highly borrowed from the ceph-csi project's mergify configuration. It may not be optimal but hopefully it is useful. Signed-off-by: John Mulligan <[email protected]>
1 parent edbfb5a commit 12a5428

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/mergify.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
defaults:
3+
actions:
4+
queue:
5+
name: default
6+
method: rebase
7+
update_method: rebase
8+
9+
10+
# each test should be listed separately, do not use regular expressions:
11+
# https://docs.mergify.io/conditions.html#validating-all-status-check
12+
# TODO: Use mergify's recently added 'shared configuration support'
13+
# to dedup some of the check-x=y repetition in the future.
14+
queue_rules:
15+
- name: default
16+
conditions:
17+
- check-success=test
18+
- check-success=dpulls
19+
20+
21+
pull_request_rules:
22+
# Clearing approvals after content changes
23+
- name: Remove outdated approvals
24+
conditions:
25+
- base=master
26+
actions:
27+
dismiss_reviews:
28+
approved: true
29+
changes_requested: false
30+
# Perform automatic merge on conditions
31+
- name: Automatic merge on approval
32+
conditions:
33+
- check-success=test
34+
- check-success=dpulls
35+
- "-draft"
36+
# Contributors should set the 'do-not-merge' label if they don't want
37+
# the PR to be (auto)merged for some reason.
38+
- "label!=do-no-merge"
39+
# A reviewer should set a label starting with 'review-in-progress' (and
40+
# suffixed by their username) in order to indicate a detailed review has
41+
# been started and not completed. This will hold the PR until the
42+
# label has been removed.
43+
- "-label~=^review-in-progress"
44+
- "base=master"
45+
# Even if there are 2 or more approvals we won't automerge if there are
46+
# any changes requested.
47+
- "#changes-requested-reviews-by=0"
48+
- or:
49+
# Any contributor's PR can be automerged with 2 (or more) reviews.
50+
- "#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.
53+
- and:
54+
- "updated-at<15 days ago"
55+
- "author=@maintainers"
56+
- "#approved-reviews-by>=1"
57+
actions:
58+
queue: {}
59+
dismiss_reviews: {}
60+
# Conflict resolution prompt
61+
- name: Ask contributor to resolve a conflict
62+
conditions:
63+
- conflict
64+
actions:
65+
comment:
66+
message: "This pull request now has conflicts with the target branch.
67+
Please resolve these conflicts and force push the updated branch."

0 commit comments

Comments
 (0)