From c109a7ab309ced75d967ce22309d4b707a8b83c2 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 10 Sep 2026 20:58:25 +0200 Subject: [PATCH] fix(mergify): drop docs default review requirement to one approval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review Requirements' DefaultReviewCond anchor required #approved-reviews-by >= 2; drop it to 1 so a single approval is enough to merge on Mergifyio/docs, for everyone, not another carve-out. DefaultReviewCond is shared by the Hotfix Review Requirements protection (`or: *DefaultReviewCond`) and by the request-review pull request rule, so both move with it. That also makes the hotfix-specific hotfix Review Requirements' escapes dead: its eng-mgr-with-one-approval and devs-with-eng-mgr-or-fix/revert-title branches only ever granted "one approval clears review", which the new default already grants to any author. Removed them along with the now-redundant `label != hotfix` guard in the request-review rule's condition, which existed only to avoid double-counting that escape. Checked the repo's GitHub side: of its 9 rulesets, only "Require pull request for default branch" carries a pull_request rule, and its required_approving_review_count is 0 — no ruleset conflicts with the new threshold. Co-Authored-By: Claude Sonnet 5 Change-Id: I9983de27602a153f5510b61cc8bb5c91a86e7705 --- .mergify.yml | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index ece2fc223c..09f12f908d 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -44,7 +44,7 @@ merge_protections: - label != hotfix success_conditions: - or: &DefaultReviewCond - - "#approved-reviews-by >= 2" + - "#approved-reviews-by >= 1" - author = dependabot[bot] - author = renovate[bot] # mergify-ci-bot needs no approval for the deterministic syncers, but @@ -57,22 +57,7 @@ merge_protections: if: - label = hotfix success_conditions: - - or: - - or: &HotfixReviewCond - # Author is engineering manager, we allow with one review - - and: - - author=@eng-mgr - - "#approved-reviews-by>=1" - - and: - - author=@devs - # in any other case, we allow if approve by engineering manager - # or anyone if it's a regular fix/revert - - or: - - approved-reviews-by=@eng-mgr - - and: - - title~=^(revert|fix) - - "#approved-reviews-by>=1" - - or: *DefaultReviewCond + - or: *DefaultReviewCond # yamllint disable-line rule:line-length - body ~= (Fix|Related).* (INC-\d+|https:\/\/github\.com\/Mergifyio\/docs\/security\/dependabot\/\d+) @@ -116,8 +101,8 @@ pull_request_rules: conditions: - -author=dependabot[bot] - -author=renovate[bot] - # Bots are not routed for review, except the docs agent, which now needs - # two approvals like anyone else. Gated on -draft so the ten drafts a + # Bots are not routed for review, except the docs agent, which needs + # approval like anyone else. Gated on -draft so the ten drafts a # Monday audit opens do not each ping the team before a human wants them. - or: - -author=mergify-ci-bot @@ -129,13 +114,8 @@ pull_request_rules: - and: *CheckRuns - "#changes-requested-reviews-by=0" - review-requested!=@devs - - and: - - or: - - label!=hotfix - - not: - or: *HotfixReviewCond - - not: - or: *DefaultReviewCond + - not: + or: *DefaultReviewCond actions: request_reviews: teams: