Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <review-gate check>"
not_queue_branch: &not_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}$)'
Expand Down Expand Up @@ -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:
Expand Down