Skip to content

Commit cbca0c4

Browse files
ci: add merge bot
we are using this bot (Mergify) in the operator repo use it here as well Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
1 parent 24b2f4e commit cbca0c4

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/mergify.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
pull_request_rules:
2+
- name: auto-merge
3+
description: >
4+
Automatic merge of PRs to main
5+
conditions:
6+
- "#approved-reviews-by>=1"
7+
- "#review-requested=0"
8+
- "#changes-requested-reviews-by=0"
9+
- base=main
10+
- label!=do-not-merge
11+
- label!=needs-rebase
12+
- check-success=pre-commit
13+
- check-success=semantic-pr
14+
15+
actions:
16+
merge:
17+
method: squash
18+
commit_message_template: |
19+
{{ title }} (#{{ number }})
20+
21+
{{ body }}
22+
23+
{% for user in approved_reviews_by %}
24+
Approved-by: {{ user }}
25+
{% endfor %}
26+
delete_head_branch:
27+
28+
- name: ping author on conflicts and add 'needs-rebase' label
29+
conditions:
30+
- conflict
31+
- -closed
32+
actions:
33+
label:
34+
add:
35+
- needs-rebase
36+
comment:
37+
message: >
38+
This pull request has merge conflicts that must be resolved before it
39+
can be merged. @{{author}} please rebase it.
40+
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork
41+
42+
- name: remove 'needs-rebase' label when conflict is resolved
43+
conditions:
44+
- -conflict
45+
- -closed
46+
actions:
47+
label:
48+
remove:
49+
- needs-rebase

0 commit comments

Comments
 (0)