forked from metasfresh/metasfresh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.mergify.yml
301 lines (292 loc) · 11.4 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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
queue_rules:
- name: default
conditions:
- check-success=testspace-analytics
- check-success=continuous-integration/jenkins/branch
pull_request_rules:
############
# Act on PRs
############
- name: After UAT-PR is integrated, add branch-label and delete the PR-branch
conditions:
- merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
- or: &ALL_BASE_BRANCHES # this rule should apply to both the project-branches from above, and master
- or: &PROJECT_BRANCHES_UAT # look 'ma, i'm doing https://docs.mergify.com/configuration/#yaml-anchors-and-aliases !
# Please keep in sync with the branches at .testspace.yml
- base=arctic_north_uat
- base=blue_horizon_uat
- base=big_coconut_uat
- base=clone_wars_uat
- base=epic_party_uat
- base=gray_knight_uat
- base=hard_encoded_uat
- base=hostile_tractor_uat
- base=inner_silence_uat
- base=intensive_care_uat
- base=iron_plant_uat
- base=koala_yawn_uat
- base=mad_orange_uat
- base=majestic_kangaroo_uat
- base=massive_entropy_uat
- base=middle_ages_uat
- base=modified_carbon_uat
- base=modus_operandi_uat
- base=neon_underwear_uat
- base=pink_rooster_uat
- base=release
- base=soft_panda_uat
- base=science_vessel_uat
- base=secondary_opinion_uat
- base=tasty_ham_uat
- base=tenacious_d_uat
- base=vampire_textbook_uat
- base=yoyo_uat
- or: &PROJECT_BRANCHES_HOTFIX
- base=hard_encoded_hotfix
- base=intensive_care_hotfix
- base=mad_orange_hotfix
- base=massive_entropy_hotfix
- base=pink_rooster_hotfix
- base=secondary_opinion_hotfix
- base=soft_panda_hotfix
- base=tasty_ham_hotfix
- base=yoyo_hotfix
actions:
label:
add:
- "branch:{{base}}"
delete_head_branch:
- name: After master-PR is integrated, add two labels branch:master and in:5.177_master; also, delete the PR-branch
conditions:
- merged-at > '2024-07-09 00:00Z' # don't jump on every merged PR throughout history
- base=master
actions:
label:
add:
- "branch:{{base}}"
- "in:5.178_master"
delete_head_branch:
- name: Automatic squash-merge successful PRs into the respective base-branch
conditions:
- check-success=testspace-analytics
- check-success=continuous-integration/jenkins/branch
- or: *ALL_BASE_BRANCHES
- or:
- "#approved-reviews-by>=1"
- label=ops:without_review_approval
- not: label=ops:dont_auto_merge
actions:
queue:
name: default
method: squash
# # This rule is for the derivitative PRs that we created (note the label)
# It's commented out right now, because the rules to create those branches is also commented out
# - name: Automatic merge PRs labeled with `ops:merge_towards_master` into the respective `_uat` or `master`-branch
# conditions:
# - check-success=testspace-analytics
# - check-success=continuous-integration/jenkins/branch
# - or:
# - or: *PROJECT_BRANCHES_UAT
# - or:
# - base=master
# - label=ops:merge_towards_master
# - not: label="ops:dont_auto_create_PR"
# actions:
# queue:
# name: default
# method: merge
# The following is commentede out, because too many times this failed doe to conflicts and there is a high probability
# for PRs from the same base branch getting out of order
# #########################
# # Create derivative PRs
# #########################
#
#
# # PRs for _uat => master
# - name: When a UAT-Branch PR is integrated, create a PR towards the master-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - or: *PROJECT_BRANCHES_UAT
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# title: "{{ head }} to master - Port PR {{ title }} (copy #{{ number }})"
# branches:
# - master
# assignees: # the original PR's author shall be notified when the merge-towards-master build fails
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: &MERGIFY_PR_BODY # we include the original body, because it might reference the metasfresh-issue
# "This is an automatic copy of pull request #{{number}} done by [Mergify](https://mergify.com).\n\n----\n\n**Original PR-body (if any):**\n{{ body }}\n\n----\n\n**Mergify-Cherry-Pick-Error (if any)**\n{{cherry_pick_error}}"
#
# #
# # PRs for hotfix => _uat
# - name: When a adorable_badger_hotfix-Branch PR is integrated, create a PR towards the adorable_badger_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=adorable_badger_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - adorable_badger_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a big_coconut_hotfix-Branch PR is integrated, create a PR towards the big_coconut_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=big_coconut_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - big_coconut_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a blonde_monkey_hotfix-Branch PR is integrated, create a PR towards the blonde_monkey_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=blonde_monkey_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - blonde_monkey_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a hard_encoded_hotfix-Branch PR is integrated, create a PR towards the hard_encoded_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=hard_encoded_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - hard_encoded_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a intensive_care_hotfix-Branch PR is integrated, create a PR towards the intensive_care_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=intensive_care_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - intensive_care_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a mad_orange_hotfix-Branch PR is integrated, create a PR towards the mad_orange_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=mad_orange_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - mad_orange_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a secondary_opinion_hotfix-Branch PR is integrated, create a PR towards the secondary_opinion_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=secondary_opinion_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - secondary_opinion_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a soft_panda_hotfix-Branch PR is integrated, create a PR towards the soft_panda_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=soft_panda_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - soft_panda_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a science_vessel_hotfix-Branch PR is integrated, create a PR towards the science_vessel_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=science_vessel_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - science_vessel_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a tenacious_d_hotfix-Branch PR is integrated, create a PR towards the tenacious_d_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=tenacious_d_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - tenacious_d_uat
# assignees:
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a tasty_ham_hotfix-Branch PR is integrated, create a PR towards the tasty_ham_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=tasty_ham_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - tasty_ham_uat
# assignees: # the original PR's author shall be notified when the merge-towards-_uat build fails
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY
# - name: When a yoyo_hotfix-Branch PR is integrated, create a PR towards the yoyo_uat-branch
# conditions:
# - merged-at > '2023-03-15 00:00Z' # don't jump on every merged PR throughout history
# - base=yoyo_hotfix
# - not: label="ops:dont_auto_create_PR"
# actions:
# copy:
# branches:
# - yoyo_uat
# assignees: # the original PR's author shall be notified when the merge-towards-_uat build fails
# - "{{ author }}"
# labels:
# - "ops:merge_towards_master"
# body: *MERGIFY_PR_BODY