Skip to content

chore: clean the clone after every merge - #82

Merged
Bryan Fawcett (bryanfawcett) merged 1 commit into
stagingfrom
claude/blissful-bell-4liuye
Oct 13, 2026
Merged

Bryan Fawcett (bryanfawcett) merged 1 commit into
stagingfrom
claude/blissful-bell-4liuye

Conversation

@bryanfawcett

Copy link
Copy Markdown
Member

What

Adds scripts/clean.mjs, the same script as in nyuchi/toddle-enhancement-extension and nyuchi/nyuchi-licence-server. It removes:

  • Generated output: dist/, .astro/, .vercel/output/, qa-report.json and the tools' caches, but only where Git ignores them.
  • Claude Code worktrees that have nothing uncommitted.
  • Local branches that are done:
    • already in origin/main or origin/staging, squash merges included;
    • or their remote branch was deleted after merge, and the local copy held nothing unpushed.

It never touches main, staging, the branch you have checked out, or one in a worktree.

When it runs

  • After Claude Code merges a pull request: a PostToolUse hook in .claude/settings.json. The existing permissions are kept.
  • After a git pull that merges: .githooks/post-merge. A new prepare script runs scripts/install-hooks.mjs, the extension's script, which turns hooks on only where that silences nothing and never fails an install.
  • By hand: npm run clean.

The options are --dry-run, --deep and --no-fetch. Docs are in CONTRIBUTING.md, with a changelog note under Unreleased → Added.

Checks

🤖 Generated with Claude Code

https://claude.ai/code/session_01CoDNYz27iJ7o8PPztCzTpq


Generated by Claude Code

scripts/clean.mjs (the same script as the extension's and the licence
server's) removes the build output, the QA report, the tools' caches,
finished Claude Code worktrees and local branches already in main or
staging, touching only what Git ignores. It runs after a git pull that
merges (.githooks/post-merge, turned on by npm ci through a new prepare
script) and after Claude Code merges a pull request (.claude/settings.json,
PostToolUse), and as npm run clean.

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

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
learning Ready Ready Preview Oct 13, 2026 12:22am UTC

Request Review

@bryanfawcett
Bryan Fawcett (bryanfawcett) marked this pull request as ready for review October 13, 2026 00:26
@bryanfawcett
Bryan Fawcett (bryanfawcett) merged commit d001cbc into staging Oct 13, 2026
17 checks passed
@bryanfawcett
Bryan Fawcett (bryanfawcett) deleted the claude/blissful-bell-4liuye branch October 13, 2026 00:26

This branch was successfully deployed

1 active deployment
Preview — 5c14155e Deployed Oct 13, 2026 by vercel[bot]
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.

2 participants