mirror of
https://github.com/glittercowboy/get-shit-done
synced 2026-04-25 17:25:23 +02:00
Adds .github/workflows/branch-cleanup.yml with two jobs: - delete-merged-branch: fires on pull_request closed+merged, immediately deletes the head branch. Belt-and-suspenders alongside the repo's delete_branch_on_merge setting (see issue for the one-line owner action). - sweep-orphaned-branches: runs weekly (Sunday 4am UTC) and on workflow_dispatch. Paginates all branches, deletes any whose only closed PRs are merged — cleans up branches that pre-date the setting change. Both jobs use the pinned actions/github-script hash already used across the repo. Protected branches (main, develop, release) are never touched. 422 responses (branch already gone) are treated as success. Closes #2050 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>