forked from Mergifyio/mergify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mergify.yml
209 lines (195 loc) · 5.05 KB
/
.mergify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
defaults:
actions:
queue:
name: default
method: squash
update_method: rebase
commit_message_template: |
{{ title }} (#{{ number }})
{{ body }}
squash:
commit_message: first-commit
queue_rules:
- name: hotfix
allow_inplace_checks: true
conditions:
- and: &CheckRuns
- check-success=requirements
- check-success=pep8
- check-success=test
- check-success=docs
speculative_checks: 5
- name: default
allow_inplace_checks: true
conditions:
- and: *CheckRuns
- schedule=Mon-Fri 09:00-17:30[Europe/Paris]
speculative_checks: 5
- name: lowprio
allow_inplace_checks: true
conditions:
- and: *CheckRuns
- schedule=Mon-Fri 09:30-17:00[Europe/Paris]
speculative_checks: 3
batch_size: 5
pull_request_rules:
- name: automatic merge for hotfix
conditions:
- base=main
- author=@devs
- check-success=semantic-pull-request
- label=hotfix
- title~=^(revert|fix)
- or:
# We authorize hotfix to go through if they fix a sentry
- body~=(?m)^Fixes MERGIFY-ENGINE-
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- "#commits=1"
- label!=work-in-progress
- label!=manual merge
actions:
queue:
name: hotfix
- name: automatic merge
conditions:
- base=main
- check-success=semantic-pull-request
- and: *CheckRuns
- "check-success=Rule: feature requirements (post_check)"
- "#approved-reviews-by>=1"
- "#changes-requested-reviews-by=0"
- "#review-threads-unresolved=0"
- "#commits=1"
- label!=work-in-progress
- label!=manual merge
actions:
queue:
- name: automatic merge for python version bump
conditions:
- and: *CheckRuns
- check-success=semantic-pull-request
- check-success=constraints
- author=mergify-ci-bot
- label!=work-in-progress
- label!=manual merge
- "title~=^chore: bump python version"
- head=python-version-update
- "#commits=1"
actions:
queue:
name: lowprio
method: rebase
commit_message_template: null
- name: automatic merge from dependabot
conditions:
- and: *CheckRuns
- check-success=semantic-pull-request
- author=dependabot[bot]
- label!=work-in-progress
- label!=manual merge
- "#commits=1"
actions:
queue:
name: lowprio
method: rebase
commit_message_template: null
- name: dependabot conflict fixer
conditions:
- author=dependabot[bot]
- conflict
actions:
comment:
bot_account: mergify-ci-bot
message: "@dependabot recreate"
- name: dismiss reviews except for core devs
conditions:
- author!=@devs
actions:
dismiss_reviews: {}
- name: dismiss reviews for core devs
conditions:
- author=@devs
actions:
dismiss_reviews:
# Do not remove approval for core devs
approved: False
- name: request review
conditions:
- -author=dependabot[bot]
- label!=work-in-progress
- -merged
- -closed
- and: *CheckRuns
- "check-success=Rule: feature requirements (post_check)"
- "#approved-reviews-by=0"
- "#changes-requested-reviews-by=0"
actions:
request_reviews:
teams:
- devs
- name: warn on no Sentry
conditions:
- -body~=(?m)^Fixes MERGIFY-ENGINE-
- label=hotfix
actions:
comment:
message: Your pull request is a hotfix but does not fix a Sentry issue. 🤔
- name: warn on conflicts
conditions:
- conflict
- -closed
actions:
comment:
message: "@{{author}} this pull request is now in conflict 😩"
label:
add:
- conflict
- name: remove conflict label if not needed
conditions:
- -conflict
actions:
label:
remove:
- conflict
- name: label on unresolved
conditions:
- "#review-threads-unresolved>0"
actions:
label:
add:
- Review Threads Unresolved
- name: unlabel on resolved
conditions:
- "#review-threads-unresolved=0"
actions:
label:
remove:
- Review Threads Unresolved
- name: warn on CI failure for hotfix
conditions:
- label=hotfix
- "#check-failure>0"
actions:
comment:
message: Your hotfix is failing CI @{{author}} 🥺
- name: feature requirements
conditions:
- or:
- "-title~=^feat"
- and:
- or:
- label=Skip release note
- files~=^releasenotes/notes
- or:
- label=Skip documentation
- files~=^docs/source
- body~=MRGFY-
actions:
post_check:
title: |
{% if check_succeed %}
Feature requirements are present.
{% else %}
Feature requirements are missing.
{% endif %}