Skip to content

[chore] Add merged branch and worktree cleanup script (#16) - #21

Merged
ThreeLight2000 merged 2 commits into
mainfrom
chore/16-merged-worktree-cleanup
Aug 18, 2026
Merged

[chore] Add merged branch and worktree cleanup script (#16)#21
ThreeLight2000 merged 2 commits into
mainfrom
chore/16-merged-worktree-cleanup

Conversation

@ThreeLight2000

Copy link
Copy Markdown
Contributor

Fixes #16

Summary

  • add pnpm cleanup:merged for removing local branches already merged into the selected base
  • remove clean linked worktrees before deleting their branches
  • protect the current and base branches
  • support dry-run, confirmation, dirty-worktree protection, --force, and stale-worktree pruning controls
  • add CLI coverage for clean, dirty, dry-run, and stale worktree scenarios

Verification

  • pnpm verify
  • node --test --test-reporter=dot scripts/cleanup-merged.test.mjs (4 tests)
  • git diff --check

Scope

Repository tooling only; no client or server runtime behavior changes.

@ThreeLight2000 ThreeLight2000 self-assigned this Aug 18, 2026
@ThreeLight2000 ThreeLight2000 changed the title [chore] Add merged branch and worktree cleanup script (#16) Add merged branch and worktree cleanup script (#16) Aug 18, 2026
@ThreeLight2000
ThreeLight2000 marked this pull request as ready for review August 18, 2026 18:14
@ThreeLight2000 ThreeLight2000 changed the title Add merged branch and worktree cleanup script (#16) [chore] Add merged branch and worktree cleanup script (#16) Aug 18, 2026
@ThreeLight2000
ThreeLight2000 merged commit 28f8b42 into main Aug 18, 2026
6 of 8 checks passed
@ThreeLight2000
ThreeLight2000 deleted the chore/16-merged-worktree-cleanup branch August 18, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[chore] Add merged branch and worktree cleanup script

1 participant