From 5d7f53b245eeeed70c26cfde09012b0ce9befe30 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Thu, 19 Feb 2026 17:04:06 +0800 Subject: [PATCH] ci: add mergify merge queue config --- .mergify.yml | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .mergify.yml diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 00000000..ed09b1f7 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,79 @@ +# +# Copyright 2026 Apollo Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +merge_queue: + max_parallel_checks: 1 + +queue_rules: + - name: single-commit + autoqueue: true + batch_size: 1 + merge_method: rebase + queue_conditions: &single_commit_conditions + - "base = main" + - "-draft" + - "-closed" + - "-conflict" + - "#approved-reviews-by >= 1" + - "#changes-requested-reviews-by = 0" + - "#commits = 1" + - "check-success = compile-matrix (8)" + - "check-success = compile-matrix (11)" + - "check-success = compile-matrix (17)" + - "check-success = unit-integration-pr" + - "check-success = compat-api" + - "check-success = compat-spring-spring-3.1.1-jdk8" + - "check-success = compat-spring-spring-6.1-jdk17" + - "check-success = compat-spring-boot-spring-boot-2.7-jdk8" + - "check-success = compat-spring-boot-spring-boot-3.3-jdk17" + - "check-success = compat-spring-boot-spring-boot-4.0-jdk17" + - "check-success = license" + - "check-success = CLAssistant" + merge_conditions: *single_commit_conditions + + - name: multi-commit + autoqueue: true + batch_size: 1 + merge_method: squash + queue_conditions: &multi_commit_conditions + - "base = main" + - "-draft" + - "-closed" + - "-conflict" + - "#approved-reviews-by >= 1" + - "#changes-requested-reviews-by = 0" + - "#commits > 1" + - "check-success = compile-matrix (8)" + - "check-success = compile-matrix (11)" + - "check-success = compile-matrix (17)" + - "check-success = unit-integration-pr" + - "check-success = compat-api" + - "check-success = compat-spring-spring-3.1.1-jdk8" + - "check-success = compat-spring-spring-6.1-jdk17" + - "check-success = compat-spring-boot-spring-boot-2.7-jdk8" + - "check-success = compat-spring-boot-spring-boot-3.3-jdk17" + - "check-success = compat-spring-boot-spring-boot-4.0-jdk17" + - "check-success = license" + - "check-success = CLAssistant" + merge_conditions: *multi_commit_conditions + +pull_request_rules: + - name: notify author when PR has conflicts + conditions: + - "conflict" + - "-closed" + actions: + comment: + message: "@{{author}} This pull request has conflicts with the target branch. Please resolve them and update the branch before merging."