-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mergify.yml
224 lines (216 loc) · 5.42 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
shared:
ci_success: &ci_success
- "check-success=Run unit tests"
- "check-success=Run lint"
- "check-success=Run stylelint"
- or:
- and:
- head=main
- "check-success=netlify/dainty-arithmetic-94f385/deploy-preview"
- and:
- head!=main
queue_conditions: &queue_conditions
- -label=Hold merge
- -label=Addressing issues
- -conflict
- "#approved-reviews-by>=1"
default_queue_conditions: &default_queue_conditions
- and: *ci_success
- and: *queue_conditions
- author!=dependabot[bot]
dependabot_queue_conditions: &dependabot_queue_conditions
- and: *ci_success
- and: *queue_conditions
- author=dependabot[bot]
release_queue_conditions: &release_queue_conditions
- head=changeset-release/main
- "#approved-reviews-by>=1"
team_inkbeard: &team_inkbeard
- files~=^apps/inkbeard/
team_ui_library: &team_ui_library
- files~=^apps/ui-library/
team_budget_it: &team_budget_it
- files~=^apps/budget-it/
team_general_ui: &team_general_ui
- files~=^packages/ui-theme/
- files~=^packages/ui-vue/
- files~=^packages/ui/
- files~=^packages/eslint-config/
- files~=^packages/stylelint-config/
- files~=^packages/typescript-config/
partition_rules:
- name: default
fallback_partition: true
- name: inkbeard
conditions:
- and: *team_inkbeard
- name: examples
conditions:
- and: *team_ui_library
- name: budget-it
conditions:
- and: *team_budget_it
- name: general ui
conditions:
- and: *team_general_ui
merge_queue:
max_parallel_checks: 3
queue_rules:
- name: release
queue_conditions:
- and: *release_queue_conditions
- name: default
batch_size: 3
queue_conditions:
- and: *default_queue_conditions
- name: dependabot
batch_size: 10
batch_max_wait_time: 30 min
queue_conditions:
- and: *dependabot_queue_conditions
pull_request_rules:
# PR approval rules
- name: Automatically approve Dependabot PRs
conditions:
- author=dependabot[bot]
- and: *ci_success
- or:
- dependabot-update-type=version-update:semver-minor
- dependabot-update-type=version-update:semver-patch
actions:
review:
type: APPROVE
- name: Add bot approval for PRs ready to merge
conditions:
- or:
- and:
- head!=changeset-release/main
- and: *ci_success
- head=changeset-release/main
- label=Ready to merge
actions:
review:
type: APPROVE
# PR queue rules
- name: Add PR to default queue
conditions:
- and: *default_queue_conditions
actions:
queue:
name: default
- name: Add PR to dependabot queue
conditions:
- and: *dependabot_queue_conditions
actions:
queue:
name: dependabot
- name: Add PR to release queue
conditions:
- and: *release_queue_conditions
actions:
queue:
name: release
# PR test rules
- name: Test for conflicts
conditions:
- -closed
- conflict
actions:
label:
toggle:
- "failure: conflict"
# PR label rules
- name: Add PR stack label for stacked PRs
conditions:
- -closed
- base!=main
actions:
label:
add:
- PR stack
- name: toggle generator label
conditions:
- -closed
- files~=turbo/generators/
actions:
label:
toggle:
- "feature: generator"
- name: toggle unit test failure label
conditions:
- -closed
- "check-failure=Run unit tests"
actions:
label:
toggle:
- "failure: unit test"
- name: toggle lint failure label
conditions:
- -closed
- "check-failure=Run lint"
actions:
label:
toggle:
- "failure: lint"
- name: toggle stylelint failure label
conditions:
- -closed
- "check-failure=Run stylelint"
actions:
label:
toggle:
- "failure: stylelint"
- name: toggle build failure label
conditions:
- -closed
- "check-failure=Build"
actions:
label:
toggle:
- "failure: build"
# Partition rules
# Would ideally have this as dynamic, but Mergify doesn't support the `partition-queue-name` attribute at the moment.
- name: inkbeard partition workflow
conditions:
- and: *ci_success
- and: *team_inkbeard
actions:
github_actions:
workflow:
dispatch:
- workflow: partition.yml
inputs:
project_name: inkbeard
- name: examples partition workflow
conditions:
- and: *ci_success
- and: *team_ui_library
actions:
github_actions:
workflow:
dispatch:
- workflow: partition.yml
inputs:
project_name: examples
- name: budget-it partition workflow
conditions:
- and: *ci_success
- and: *team_budget_it
actions:
github_actions:
workflow:
dispatch:
- workflow: partition.yml
inputs:
project_name: budget-it
- name: general ui partition workflow
conditions:
- and: *ci_success
- and: *team_general_ui
actions:
github_actions:
workflow:
dispatch:
- workflow: partition.yml
inputs:
project_name: general ui