diff --git a/.mergify.yml b/.mergify.yml index d60209f0..396d37a0 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,9 +1,46 @@ # Mergify: policy lives in systemfsoftware/.github (.mergify.yml). This file only names this repo's CI checks. extends: .github queue_rules: + # Checked on the PR itself before it enters the queue. + - name: subtree + merge_method: merge + queue_conditions: + # Recognised from the commits themselves: both anchored git-subtree trailer + # lines must be present (ruling 9, SYS-1246). Same checks as default. + - "commits[*].commit_message ~= (?m)^git-subtree-dir: \\S+$" + - "commits[*].commit_message ~= (?m)^git-subtree-split: [0-9a-f]{40}$" + - or: + - check-success = review-gate + - approved-reviews-by = kiro-systemf[bot] + - and: + - author = dependabot[bot] + - dependabot-update-type != version-update:semver-major + - or: + - dependabot-update-type = version-update:semver-patch + - dependabot-update-type = version-update:semver-minor + - "title ~= (?i)\\bthe [a-z0-9@/._-]*(minor|patch)[a-z0-9@/._-]* group\\b" + - check-success = checks / the gate + - or: + - check-success = check / a publishable-package change needs an intent + - check-skipped = check / a publishable-package change needs an intent + - check-success = Same bytes on every host + # Checked on Mergify's queue draft PR (mergify/merge-queue/*), i.e. CI on the PR rebased with main and any batch. + merge_conditions: + - check-success = checks / the gate + - check-success = Same bytes on every host + - name: default # Checked on the PR itself before it enters the queue. queue_conditions: + # Ruling 9 (SYS-1246): subtree PRs merge via the subtree queue above; a subtree + # claim without trailers matches no queue and cannot merge at all. + - "-commits[*].commit_message ~= (?m)^git-subtree-dir: \\S+$" + - "-title ~= (?i)\\b(add|pull|update|sync|vendor|refresh|import)\\b[^.]*\\bsubtrees?\\b|\\bsubtrees?\\b[^.]*(\\badd\\b|\\bpull\\b|\\bupdate\\b|\\bsync\\b|\\bvendor\\b|\\brefresh\\b|\\bimport\\b)" + # Vendored subtree prefixes in this repo: hand edits without trailers cannot merge. + - not: + or: + - "added-files ~= ^(repos/alchemy|repos/effect)/" + - "modified-files ~= ^(repos/alchemy|repos/effect)/" - or: - check-success = review-gate - approved-reviews-by = kiro-systemf[bot]