summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-28 16:17:47 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-28 16:17:47 +0300
commit817dd675ae36b1c5a33c1fc8d98e3357a8a71154 (patch)
tree8433c293712af9bcb3bd378579237d8a40f086be
parent51553b65feb1d2834f074525670a43d62aeeecbc (diff)
downloadmergify-817dd675ae36b1c5a33c1fc8d98e3357a8a71154.tar.gz
mergify-817dd675ae36b1c5a33c1fc8d98e3357a8a71154.zip
feat: add base-branch labeling + author-assign rules (T8937)
Adds 5 new pull_request_rules to the central Mergify config: - 4× Label PR with <equuleus|current|circinus|sagitta> — replaces vyos/.github:add-pr-labels.yml (consumes the same base→label mapping from labeler.yml). Uses toggle: for base-retarget cleanup; omits -closed so labels persist post-merge for triage history. - 1× Auto-assign PR author — replaces vyos/.github:assign-author.yml. Uses -author~=\[bot\]$ to skip GitHub App-bot identities, plus explicit exceptions for copilot-swe-agent and vyosbot (legacy PAT). PR stale migration was DEFERRED (see Phorge T8937 + spec §2) because Mergify's own label/comment activity bumps updated_at, producing a self-unstaling cycle that breaks parity with actions/stale@v10. PR + issue stale stay in vyos/.github:check-stale.yml. Advances: T8937 🤖 Generated by [robots](https://vyos.io)
-rw-r--r--.mergify.yml53
1 files changed, 53 insertions, 0 deletions
diff --git a/.mergify.yml b/.mergify.yml
index 08541df..c236cf1 100644
--- a/.mergify.yml
+++ b/.mergify.yml
@@ -219,6 +219,59 @@ pull_request_rules:
Pull requests targeting EOL release branches (`sagitta`, `crux`,
`circinus`) are not accepted and have been closed automatically.
+ # ------------------------------------------------------------------
+ # Base-branch labeling — replaces vyos/.github:add-pr-labels.yml.
+ #
+ # `toggle:` adds the label when the base matches and removes it when
+ # the base changes. `-closed` is INTENTIONALLY omitted — including it
+ # would cause toggle to remove the label on PR close/merge, breaking
+ # historical query like `is:pr merged label:current`. Labels are kept
+ # post-merge for triage history; toggle only reacts to base-branch
+ # changes, not lifecycle state.
+ #
+ # The `labeler.yml` config in vyos/.github (consumed by the GHA being
+ # retired) covers four branches: equuleus, current, circinus, sagitta.
+ # ------------------------------------------------------------------
+ - name: Label PR with equuleus
+ description: Mirror base-branch as label. Replaces vyos/.github:add-pr-labels.yml.
+ conditions: [base=equuleus]
+ actions: { label: { toggle: [equuleus] } }
+ - name: Label PR with current
+ description: Mirror base-branch as label. Replaces vyos/.github:add-pr-labels.yml.
+ conditions: [base=current]
+ actions: { label: { toggle: [current] } }
+ - name: Label PR with circinus
+ description: Mirror base-branch as label. Replaces vyos/.github:add-pr-labels.yml.
+ conditions: [base=circinus]
+ actions: { label: { toggle: [circinus] } }
+ - name: Label PR with sagitta
+ description: Mirror base-branch as label. Replaces vyos/.github:add-pr-labels.yml.
+ conditions: [base=sagitta]
+ actions: { label: { toggle: [sagitta] } }
+
+ # ------------------------------------------------------------------
+ # Auto-assign PR author — replaces vyos/.github:assign-author.yml.
+ #
+ # The negative-regex condition `-author~=\[bot\]$` skips identities
+ # ending in [bot] (GitHub App-bot convention per data/github.md).
+ # The literal-author exclusions cover non-suffix identities in the
+ # current fleet (copilot-swe-agent, vyosbot legacy PAT).
+ # Maintenance: when a new non-[bot]-suffix bot identity joins the
+ # fleet, append `'author!=<login>'` here.
+ # ------------------------------------------------------------------
+ - name: Auto-assign PR author
+ description: Assign the PR author. Replaces vyos/.github:assign-author.yml.
+ conditions:
+ - -closed
+ - -merged
+ - '-author~=\[bot\]$'
+ - 'author!=copilot-swe-agent'
+ - 'author!=vyosbot'
+ actions:
+ assign:
+ add_users:
+ - "{{ author }}"
+
commands_restrictions:
# Both Maintainers teams are listed for defense-in-depth.
#