-
Notifications
You must be signed in to change notification settings - Fork 697
/
mergify.yml
198 lines (180 loc) · 5.07 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
# Note: We do not use the rebase strategy to merge PRs, because that
# loses information needed by changelog-d to associate commits with PRs.
priority_rules:
- name: high priority
conditions:
- 'label=priority: high :fire:'
priority: high
# The idea is we slightly prioritize those PRs because we're in
# a release cycle if a PR matches.
- name: release branch
conditions:
- 'base~=^3\.'
- 'label!=backport'
# 'normal' is 2000, 'high' is 3000
priority: 2500
pull_request_rules:
# implementing PR delay logic: apply a label after 2 days of inactivity
# the label will allow Mergify to merge (see #8442, #8448)
- actions:
label:
add:
- merge delay passed
name: Wait for 2 days before validating merge
conditions:
- or:
- 'label=priority: high :fire:'
- updated-at<2 days ago
- or:
- label=merge me
- label=squash+merge me
- label=merge+no rebase
- '#approved-reviews-by>=2'
# label when Mergify is ready but waiting for the above
- actions:
label:
add:
- ready and waiting
name: Waiting out merge delay (used by bot)
conditions:
- base=master
- -draft
- -closed
- or:
- label=merge me
- label=squash+merge me
- label=merge+no rebase
- '#approved-reviews-by>=2'
- '#changes-requested-reviews-by=0'
# oy
# lifted these from branch protection imports
- check-success=fourmolu
- check-success=hlint
- check-success=Meta checks
- check-success=Doctest Cabal
- check-success=Validate post job
- check-success=Bootstrap post job
- 'check-success=docs/readthedocs.org:cabal'
# label when Mergify didn't trigger a merge automatically
- actions:
label:
add:
- waiting too long
name: Mergify hasn't merged a PR yet
conditions:
- base=master
- -draft
- -closed
- -merged
- '#approved-reviews-by>=2'
- '#changes-requested-reviews-by=0'
- updated-at<4 days ago
- label=merge delay passed
# oy
# lifted these from branch protection imports
- check-success=fourmolu
- check-success=hlint
- check-success=Meta checks
- check-success=Doctest Cabal
- check-success=Validate post job
- check-success=Bootstrap post job
- 'check-success=docs/readthedocs.org:cabal'
# rebase+merge strategy
- actions:
queue:
name: default
name: Put pull requests in the rebase+merge queue
conditions:
- base=master
- label=merge me
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'
# merge+squash strategy
- actions:
queue:
name: squash-merge
name: Put pull requests in the squash+merge queue
conditions:
- base=master
- label=squash+merge me
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'
# merge+no rebase strategy
- actions:
merge:
method: merge
name: Merge "merge+no rebase" pull requests directly (without a queue)
conditions:
- base=master
- label=merge+no rebase
- label=merge delay passed
- '#approved-reviews-by>=2'
- '-label~=^blocked:'
# merge strategy for release branches
- actions:
queue:
name: default
name: Put release branch pull requests in the rebase+merge queue
conditions:
- label=merge me
- base!=master
- -body~=backport
- '#approved-reviews-by>=2'
- '-label~=^blocked:'
# merge+squash strategy for release branches
- actions:
queue:
name: squash-merge
name: Put release branch pull requests in the squash+merge queue
conditions:
- base!=master
- label=squash+merge me
- -body~=backport
- '#approved-reviews-by>=2'
- '-label~=^blocked:'
# merge strategy for backports: require 1 approver instead of 2
- actions:
queue:
name: default
name: Put backports in the rebase+merge queue
conditions:
- label=merge me
- base!=master
- body~=backport
- '#approved-reviews-by>=1'
- '-label~=^blocked:'
# merge+squash strategy for backports: require 1 approver instead of 2
- actions:
queue:
name: squash-merge
name: Put backports in the squash+merge queue
conditions:
- label=squash+merge me
- base!=master
- body~=backport
- '#approved-reviews-by>=1'
- '-label~=^blocked:'
# backports should be labeled as such
- actions:
label:
add:
- backport
name: Label backports as such
conditions:
- body~=automatic backport
queue_rules:
# Mergify now requires different queues for different strategies
- name: default
update_bot_account: Mikolaj
merge_method: merge
update_method: rebase
- name: squash-merge
update_bot_account: Mikolaj
merge_method: squash
update_method: merge
defaults:
actions:
backport:
title: "Backport #{{ number }}: {{ title }}"