Skip to content

Improve hook output and remove redundant {origin} placeholder - #152

Merged
raphi011 merged 4 commits into
mainfrom
hook-output-improvements
Mar 27, 2026
Merged

raphi011 merged 4 commits into
mainfrom
hook-output-improvements

Conversation

@raphi011

Copy link
Copy Markdown
Owner

Improve hook execution output: color messages with lipgloss styles, show hook description instead of name, include exit codes on failure. Remove the redundant {origin} placeholder (identical to {repo}). Reorganize README shell integration section.

Breaking Changes

  • {origin} hook placeholder removed — use {repo} instead

Test Coverage

  • Unit tests added: 0 (existing tests updated)
  • Integration tests added: 0

raphi011 and others added 3 commits March 27, 2026 21:36
Color "Running..." message with PrimaryStyle and show description instead
of hook name when available. Remove redundant success line. Include exit
code in failure error messages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
{origin} was identical to {repo} in practice. Remove the field from
hooks.Context, all callers, config template, and docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move shell wrapper and completions into a dedicated Shell Integration
section. Link to it from Getting Started step 1. Remove {origin} from
placeholder docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Mar 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wt/prune_cmd.go 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

- Explicit --hook names now only run in the after phase, preventing
  double execution (once in before-hooks and again in after-hooks)
- Prune before-hook errors now include the actual error message
- Prune skips worktree when hook selection fails (prevents unguarded
  deletion on --hook typos)
- Add t.Parallel() to TestValidateHookTriggers subtests
- Fix stale {origin} reference in CLAUDE.md
- Clarify doc.go: before-hook failure skips individual worktree in
  prune batches, not the entire operation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@raphi011
raphi011 merged commit 269c64e into main Mar 27, 2026
1 check passed
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.

1 participant