Files
DolanandClaude Opus 5.5 a69a60baa6 chore: sweep other merged branches in post-merge cleanup (#3873)
* chore: sweep other merged branches in post-merge cleanup

Branches from earlier PRs pile up whenever a cleanup is skipped. The
skill now checks every other local and origin branch, finds the PRs
that contain its tip by commit, and deletes it only when a merged PR
has that tip as its head or in its history and no open PR uses it.
next-major/*, gh-pages and branches in worktrees are left alone, and
anything without a merged PR is kept and reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5zGDL3sgGVBMXPfny376c

* chore: delete a branch on origin only while it is at the tip that was checked

A plain `push --delete` removes whatever the branch points to when the
push runs, so commits pushed after the check would go unchecked. Both
remote deletes now lease on the checked tip: the PR's head in step 5,
and the origin tip in step 6. Git refuses the delete with "stale info"
if the branch has moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5zGDL3sgGVBMXPfny376c

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 14:48:26 +00:00
..