Repository navigation
fix(branch-retention): exempt next/hotfixes/dev in the default so releases don't delete integration branches - #308
Merged
Conversation
…eases don't delete integration branches branch-retention deletes a merged PR's head branch when nothing exempts it. The persistent next→master / hotfixes→master release PR merges with `next` / `hotfixes` as its HEAD, so on every release branch-retention deleted the integration branch — and GitHub auto-closes EVERY open PR whose base branch is deleted, silently killing in-flight feature PRs. next-reset recreates the branch but not the closed PRs. (Real incident: CLDMV/slothlet v3.16.3 closed PRs #405 and #409 unmerged.) The reusable default exempt_patterns was ["master","main","badges","gh-pages"] — missing the integration branches — even though this repo's own local-branch-retention.yml already exempts next/hotfixes/dev. Promote that same protection into the reusable default so every consumer inheriting it is covered: next is never deleted on release, in-flight PRs stay open, and the reset force-resets next in place (step 7) instead of recreating it (step 9).
…t/hotfixes) from deletion The org 'Protect Next' / 'Protect Hotfixes' rulesets carry a deletion rule, but the bot App is a bypass actor on them (bypass_mode: always) because it needs the bypass to force-reset next during a release — and that same bypass lets a delete through. So the ruleset cannot be the guardrail against the very actor that runs branch-retention. Enforce the guardrail in the action itself: refuse to delete master/main/next/hotfixes regardless of exempt_patterns or a matching retention rule. Complements the default exempt_patterns fix.
Shinrai
approved these changes
Sep 17, 2026
cldmv-bot
Bot
deleted the
fix/branch-retention-exempt-integration-branches
branch
September 17, 2026 13:42
Shinrai
added a commit
that referenced
this pull request
Sep 17, 2026
…s… (#307) ## 🚀 What's Changed ### 💥 Breaking Changes _No breaking changes_ ### ✨ Features _No new features_ ### 🐛 Bug Fixes - #308 - fix(branch-retention): hard-guard permanent branches (master/main/next/hotfixes) from deletion (966d724) - fix(branch-retention): exempt next/hotfixes/dev in the default so releases don't delete integration branches (34aa592) ### 📦 Dependencies _No dependency updates_ ### 🔧 Other Changes - #306 - ci(examples): inherit max_node_major in individual-repo workflow templates (1dde0be) <details> <summary>👥 Contributors</summary> - @Shinrai </details> <!-- co-authors --> Co-authored-by: Shinrai <[email protected]> --------- Co-authored-by: Shinrai <[email protected]> Co-authored-by: Nathaniel H <[email protected]> Co-authored-by: cldmv-bot[bot] <230771808+cldmv-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 What's Changed
💥 Breaking Changes
No breaking changes
✨ Features
No new features
🐛 Bug Fixes
📦 Dependencies
No dependency updates
🔧 Other Changes
No other changes
👥 Contributors