Repository navigation
feat(close): auto-close PRs targeting EOL release branches (sagitta, crux, circinus) - #13
Conversation
Add a `pull_request_rules` entry that closes every PR (and Mergify- created backport) opened against the EOL release branches `sagitta`, `crux`, or `circinus` in any vyos/* repo extending this config. Excludes vyos-documentation (still accepts per-branch docs backports to sagitta and circinus) and vyos.vyos (Ansible Galaxy collection on `main`; listed defensively). Replaces vyos/vyos-1x:.github/workflows/pr-auto-close.yml, which only covered sagitta. Centralizing in Mergify removes per-repo workflow drift and extends coverage to crux and circinus. Uses Mergify's `repository-name` condition attribute (bare repo name, no org prefix) — unambiguous because this central config is consumed only by vyos/* repos via `extends: mergify`.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used🔍 Remote MCP Context7Verified Technical Details for PR ReviewBased on Mergify documentation, the PR's implementation is technically sound: Pull Request Rules & Close ActionThe PR correctly uses the Guards (
|
| Layer / File(s) | Summary |
|---|---|
Auto-close rule for EOL release branches .mergify.yml |
Lines 176–221 introduce a new pull_request_rules entry named Auto-close PRs targeting EOL release branches. The rule targets PRs with base branches sagitta, crux, or circinus, applies to Mergify-created backport PRs, excludes vyos-documentation and vyos.vyos repositories, and automatically closes matching PRs with a fixed message. |
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | Title directly describes the main change: adding auto-close functionality for PRs targeting three specific EOL branches. |
| Description check | ✅ Passed | Description is comprehensive and directly related to the changeset, covering the rule implementation, exclusion rationale, mechanics verification, and test plan. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
✨ Simplify code
- Create PR with simplified code
- Commit simplified code in branch
feature/auto-close-eol-branches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Actionable comments posted: 0 |
This workflow was a newer copy of the per-branch pr-auto-close.yml files, with a branch filter targeting both sagitta and circinus. It never actually fired: pull_request_target evaluates the workflow from the PR's TARGET branch, not the default branch. PRs targeting sagitta used .github/workflows/pr-auto-close.yml from the sagitta branch; PRs targeting circinus used circinus's copy. The file on current matched no events. Functionality is now centralized in the Mergify config at vyos/mergify (see PR vyos/mergify#13, merged). vyos/vyos-1x extends that baseline via .github/mergify.yml on this branch. Sibling cleanup of vyos#5228 (sagitta) and the parallel PR removing circinus's copy.
Summary
Adds a Mergify
pull_request_rulesentry that closes every PR (including Mergify-created backports) opened against the EOL release branchessagitta,crux, andcircinusin anyvyos/*repo extending this config, with two excluded repos.Replaces vyos/vyos-1x:.github/workflows/pr-auto-close.yml (sagitta-only, per-repo GHA) with a central Mergify rule covering all three EOL branches across the fleet.
What changes
Auto-close PRs targeting EOL release branchesunderpull_request_rules:.closewith a single explanatory message.basein (sagitta,crux,circinus) ANDrepository-name != vyos-documentationANDrepository-name != vyos.vyos, with-closed/-mergedguards.Exclusion rationale
vyos-documentationsagittaandcircinus.vyos.vyosmain; listed defensively so a future branch namedsagitta/crux/circinuswould not be silently auto-closed.Mergify mechanics verified
closeaction withmessageparameter — confirmed via docs.mergify.com/workflow/actions/close.repository-nameattribute — confirmed via Mergify changelog 2022-02-16: repository-name and repository-full-name. Bare repo name, no org prefix, which is unambiguous here because this config is only consumed byvyos/*repos viaextends: mergify.Backport interaction
defaults.actions.backport(unchanged) still creates backport PRs targeting whatever branch a Maintainer requests. If a Maintainer issues@Mergifyio backport sagittaon a non-excludedvyos/*repo, the backport PR is created and then immediately closed by this rule — the intended behavior, since backports to EOL branches are not accepted.vyos-documentationcontinues to honor@Mergifyio backport sagitta circinusexactly as before.Follow-up
After this lands, the original vyos/vyos-1x:.github/workflows/pr-auto-close.yml on the
sagittabranch becomes redundant and should be removed in a separate PR againstvyos/vyos-1x:sagitta.Test plan
vyos/<any-repo>:sagitta(e.g. onvyos-1x) and confirm it is closed automatically with the expected message.vyos/vyos-documentation:sagittaand confirm it is NOT closed (exclusion holds).circinusandcruxwhere branches exist.🤖 Generated by robots