From 5b3be4238970a24fdb9f2c8a202759bbae7da978 Mon Sep 17 00:00:00 2001 From: systemfsoftware-bot Date: Sat, 5 Dec 2026 11:53:07 -0500 Subject: [PATCH] feat(mergify): an ARCHITECTURE.md change stands alone and merges on the owner's approval --- .mergify.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.mergify.yml b/.mergify.yml index 72922ee..2ed9444 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -17,6 +17,7 @@ shared: # Phase 2, once review-gate posts on every PR (comment out the line above, uncomment this one): # review_gate: &review_gate "check-success = " not_queue_branch: ¬_queue_branch "-head ~= ^mergify/merge-queue/" + touches_architecture: &touches_architecture "files ~= (^|/)ARCHITECTURE\\.md$" # Mergify has no attribute for commit parents. Recognition = trailer text + `linear-history`; see README, "Subtree PRs". subtree_dir_trailer: &subtree_dir_trailer 'commits[*].commit_message ~= (?m)^git-subtree-dir: \S+$' subtree_trailers: &subtree_trailers 'commits[*].commit_message ~= (?ms)\A(?=.*^git-subtree-dir: \S+$)(?=.*^git-subtree-split: [0-9a-f]{40}$)' @@ -88,6 +89,20 @@ merge_protections: - *not_queue_branch success_conditions: - -label = hold + - name: ARCHITECTURE.md stands alone + description: A PR that changes an ARCHITECTURE.md changes no other file. The architecture is the owner's end state and is never bundled with the code that builds toward it. + if: + - *not_queue_branch + - *touches_architecture + success_conditions: + - "#files = 1" + - name: Owner approves ARCHITECTURE.md + description: A PR that changes an ARCHITECTURE.md merges only once the owner has approved it. + if: + - *not_queue_branch + - *touches_architecture + success_conditions: + - "approved-reviews-by = ryanleecode" - name: Subtree PRs need subtree history description: Applies to a PR that claims subtree work (a title with a vendoring verb and the word subtree, not inside a hyphenated or dotted name, on a PR that adds or modifies a file under vendor/, vendored/, third_party/, third-party/, external/, repos/, subtree/ or subtrees/) and to any PR whose commits carry a git-subtree-dir trailer. Such a PR must carry git-subtree-dir and git-subtree-split trailers in one commit message and a non-linear history, so a rebased or squashed subtree PR fails. Mergify cannot read commit parents, so this does not prove the history is a genuine git subtree history. It blocks merges Mergify performs; a merge outside Mergify is blocked only where a ruleset requires the Mergify Merge Protections check. The merge method is chosen by each repo's queues (see the README); this file declares none. if: