Repository navigation
Conversation
GitHub has no account-wide setting for this, the per-repo toggle deletes every merged head branch, and Free-plan private repos cannot protect long-lived branches such as develop. This self-contained workflow runs on merged same-repo PRs and deletes the head branch unless it is the default branch, one of main/master/develop/staging/test/gh-pages/ deploy-*/release/*, or the base of another open PR. A branch that is already gone counts as success. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012rYJxu978iUSGFZ1UuqTsi
… PRs From CodeRabbit review: keep the branch when another open PR uses it as its head; read the branch's current SHA first and keep it if it moved past the merged PR head (REST has no conditional delete, so only the instant between read and DELETE is unguarded); comment each permission. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012rYJxu978iUSGFZ1UuqTsi
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (1)
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 |
|
Closing as redundant. Merged branches are now handled account-wide by the nightly 🤖 Generated with Claude Code |
Why
#95 (the first version of
branch-cleanup.yml) was auto-merged byauto-merge.ymlat 01:44 UTC, before the second version reached its branch. This PR bringsmainup to that second version, which is already on every other repo's branch-cleanup PR and is proven live on rishitank/test#16.What changed (
.github/workflows/branch-cleanup.ymlonly)gh pr list --head), as well as one that is a base.pull_request.head.sha. A 404 means the branch is already gone, which counts as success. REST has no conditional delete, so only the sub-second gap between that read and theDELETEisn't covered; a comment in the workflow says so.Note for this repo
Merges done by
auto-merge.ymluseGITHUB_TOKEN, and events created byGITHUB_TOKENdon't start other workflows. So when #95 was auto-merged,branch-cleanupdidn't run, andci/branch-cleanupsurvived (this PR reuses it). Auto-merged PRs here will keep their branches untilauto-merge.ymlmerges with a PAT or GitHub App token, or someone merges them by hand.🤖 Generated with Claude Code
https://claude.ai/code/session_012rYJxu978iUSGFZ1UuqTsi