From f288ebb6e270e29fb2734b30dc6568f00f03f303 Mon Sep 17 00:00:00 2001 From: Mehdi ABAAKOUK Date: Wed, 24 Jun 2026 19:06:51 +0200 Subject: [PATCH] ci(mergify): mimic mergify-cli config shape and drop check-runs reporting Rework the Mergify config to the modern shape used by mergify-cli: - Add shared anchors for CI checks and review conditions. - Split queue_rules into dependencies (fast-forward batch) and default (squash); queue_conditions now carry only structural gating, with CI/review gating moved into named merge_protections blocks. - Drop the legacy automatic-merge pull_request_rule (queueing is now driven by queue_conditions) and the priority_rules block. - Switch reporting_method from check-runs to deployments and enable auto_merge_conditions. sql-compare specifics preserved: real CI check names (Test with Python 3.9-3.12, semgrep), the 1-approval requirement, and dependabot[bot] as the only excluded bot. Co-Authored-By: Claude Opus 4.8 (1M context) Change-Id: Iea2244dbd3e45c2482aeb5f78c2850ce8198c649 --- .mergify.yml | 78 +++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 4162597..347c9b2 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,65 +1,67 @@ extends: .github +shared: + check_runs: &CheckRuns + - check-success=Test with Python 3.9 + - check-success=Test with Python 3.10 + - check-success=Test with Python 3.11 + - check-success=Test with Python 3.12 + - check-success=semgrep + default_review_cond: &DefaultReviewCond + - "#approved-reviews-by>=1" + - author = dependabot[bot] queue_rules: + - name: dependencies + queue_conditions: + - base=main + - label!=manual merge + - author = dependabot[bot] + merge_method: fast-forward + batch_size: 7 + batch_max_wait_time: 5min + commit_message_template: - name: default queue_conditions: - - and: &CheckRuns - - check-success=Test with Python 3.9 - - check-success=Test with Python 3.10 - - check-success=Test with Python 3.11 - - check-success=Test with Python 3.12 - - check-success = semgrep - - "#approved-reviews-by>=1" - - "#changes-requested-reviews-by=0" - - "#review-threads-unresolved=0" - - "#review-requested=0" + - base=main + - label!=manual merge commit_message_template: | {{ title }} (#{{ number }}) {{ body }} merge_method: squash - - name: lowprio - queue_conditions: - - and: *CheckRuns - - "#commits=1" - - author=dependabot[bot] - merge_method: fast-forward - batch_size: 7 - batch_max_wait_time: 5min - commit_message_template: pull_request_rules: - - name: automatic merge - conditions: - - base=main - - label!=manual merge - actions: - queue: - - name: request review conditions: - -author=dependabot[bot] - -merged - -closed - and: *CheckRuns - - "#approved-reviews-by=0" - "#changes-requested-reviews-by=0" - - "review-requested!=@devs" + - review-requested!=@devs + - not: + or: *DefaultReviewCond actions: request_reviews: teams: - devs + +merge_protections: + - name: 🤖 Continuous Integration + if: [] + success_conditions: + - and: *CheckRuns + + - name: 👀 Review Requirements + if: [] + success_conditions: + - or: *DefaultReviewCond + + merge_queue: max_parallel_checks: 5 -priority_rules: - - name: priority for queue `default` - conditions: - - "#approved-reviews-by>=1" - - "#changes-requested-reviews-by=0" - - "#review-threads-unresolved=0" - - "#review-requested=0" - priority: 2250 - allow_checks_interruption: true + merge_protections_settings: - reporting_method: check-runs + reporting_method: deployments + auto_merge_conditions: true