Skip to content

Commit 2a309bf

Browse files
authored
chore: add Mergify queue rules for approval-based merge strategy (apolloconfig#5552)
* chore: add mergify queue and conflict notification rules * fix(ci): add license header to mergify config
1 parent a3381f1 commit 2a309bf

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.mergify.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#
2+
# Copyright 2026 Apollo Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
queue_rules:
17+
- name: single-commit
18+
autoqueue: true
19+
batch_size: 1
20+
merge_method: rebase
21+
queue_conditions:
22+
- "base = master"
23+
- "-draft"
24+
- "-closed"
25+
- "-conflict"
26+
- "#approved-reviews-by >= 1"
27+
- "#changes-requested-reviews-by = 0"
28+
- "#commits = 1"
29+
- "check-success = build (8)"
30+
- "check-success = build (11)"
31+
- "check-success = build (17)"
32+
- "check-success = code-style-check"
33+
- "check-success = license"
34+
- "check-success = CLAssistant"
35+
merge_conditions:
36+
- "check-success = build (8)"
37+
- "check-success = build (11)"
38+
- "check-success = build (17)"
39+
40+
- name: multi-commit
41+
autoqueue: true
42+
batch_size: 1
43+
merge_method: squash
44+
queue_conditions:
45+
- "base = master"
46+
- "-draft"
47+
- "-closed"
48+
- "-conflict"
49+
- "#approved-reviews-by >= 1"
50+
- "#changes-requested-reviews-by = 0"
51+
- "#commits > 1"
52+
- "check-success = build (8)"
53+
- "check-success = build (11)"
54+
- "check-success = build (17)"
55+
- "check-success = code-style-check"
56+
- "check-success = license"
57+
- "check-success = CLAssistant"
58+
merge_conditions:
59+
- "check-success = build (8)"
60+
- "check-success = build (11)"
61+
- "check-success = build (17)"
62+
63+
pull_request_rules:
64+
- name: notify author when PR has conflicts
65+
conditions:
66+
- "conflict"
67+
- "-closed"
68+
actions:
69+
comment:
70+
message: "@{{author}} This pull request has conflicts with the target branch. Please resolve them and update the branch before merging."

0 commit comments

Comments
 (0)