forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.mergify.yml
More file actions
156 lines (148 loc) · 5.51 KB
/
Copy path.mergify.yml
File metadata and controls
156 lines (148 loc) · 5.51 KB
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
pull_request_rules:
- name: Label conflicting pull requests
description: Add a label to a pull request with conflict to spot it easily
conditions:
- conflict
- "-closed"
actions:
label:
toggle:
- conflict
# WARNING: If the rule name below is changed, you must also update the
# condition `check-failure~=Automatic merge on PullApprove` to match the new name.
- name: Automatic merge on PullApprove
conditions:
- or:
- check-success=pullapprove
- label="fast track"
- "#approved-reviews-by>=1"
- "#review-threads-unresolved=0"
- "-draft"
- label!=docker
# Workaround for Mergify deadlock due to using "#check-failure=0":
# Mergify's own action check can appear as failed/cancelled if conditions stop matching;
# and GitHub keeps those historic failures forever. Since `#check-failure=0` counts ALL
# failures (including historic ones), this would cause a deadlock and block merges indefinitely.
# We whitelist only this self-check so merges aren't deadlocked, while all other failures still block.
- or:
- "#check-failure=0"
- and:
- "#check-failure=1"
# WARNING: This must match the rule name defined above.
# If the rule name changes, update this condition accordingly.
- check-failure~=Automatic merge on PullApprove
- "#check-pending=0"
- check-success~=Build
- or:
- check-success=pullapprove
- check-skipped=pullapprove
- check-neutral=pullapprove
actions:
merge:
method: squash
# Backport rules - cherry-pick the squashed master commit after merge.
# Apply a request-backport-* label (such as request-backport-latest or
# request-backport-supported) on the master PR (before or after merge)
# to trigger the corresponding backport.
- name: Backport to v1.7-branch
conditions:
- merged
- base=master
- or:
- label="request-backport-latest-mve-sve"
- label="request-backport-latest"
- label="request-backport-supported"
actions:
backport:
branches:
- v1.7-branch
labels:
- backport-v1.7-branch
- name: Backport to v1.6.1-branch
conditions:
- merged
- base=master
- or:
- label="request-backport-latest-mve-sve"
- label="request-backport-supported"
actions:
backport:
branches:
- v1.6.1-branch
labels:
- backport-v1.6.1-branch
- name: Backport to v1.6.1-mve-branch
conditions:
- merged
- base=master
- label="request-backport-latest-mve-sve"
actions:
backport:
branches:
- v1.6.1-mve-branch
labels:
- backport-v1.6.1-mve-branch
- name: Backport to v1.6-branch
conditions:
- merged
- base=master
- label="request-backport-supported"
actions:
backport:
branches:
- v1.6-branch
labels:
- backport-v1.6-branch
- name: Backport to v1.4.2-branch
conditions:
- merged
- base=master
- label="request-backport-supported"
actions:
backport:
branches:
- v1.4.2-branch
labels:
- backport-v1.4.2-branch
- name: Request review for MVE/SVE backports
conditions:
- author=mergify[bot]
- or:
- label~=mve-branch
- label~=sve-branch
actions:
request_reviews:
users:
- cecille
# Auto-merge backport PRs when CI is green and there are no conflicts.
# If a cherry-pick has conflicts or CI fails, the PR is left open for manual resolution.
# WARNING: If the rule name below is changed, you must also update the
# condition `check-failure~=Auto-merge clean backport PRs` to match the new name.
- name: Auto-merge clean backport PRs
conditions:
- or:
- label="backport-v1.7-branch"
- label="backport-v1.6.1-branch"
- label="backport-v1.6-branch"
- label="backport-v1.5-branch"
- label="backport-v1.4.2-branch"
- author=mergify[bot]
- "-conflict"
- "-draft"
# Same deadlock workaround as above: allow exactly 1 failure if it is
# this rule's own self-check (which Mergify marks failed when conditions
# stop matching, and GitHub retains that historic failure forever).
- or:
- "#check-failure=0"
- and:
- "#check-failure=1"
# WARNING: This must match the rule name defined above.
# If the rule name changes, update this condition accordingly.
- check-failure~=Auto-merge clean backport PRs
- "#check-pending=0"
- check-success~=Build
actions:
merge:
method: squash
merge_protections_settings:
reporting_method: check-runs