Skip to content

feat: add {pr-number} and {pr-repo} hook placeholders - #162

Merged
raphi011 merged 1 commit into
mainfrom
pr-checkout-args
Mar 31, 2026
Merged

raphi011 merged 1 commit into
mainfrom
pr-checkout-args

Conversation

@raphi011

Copy link
Copy Markdown
Owner

Add two new hook placeholders available during wt pr checkout:

  • {pr-number}: PR/MR number (empty for non-PR checkouts)
  • {pr-repo}: forge repo path, e.g. owner/repo (empty for non-PR checkouts)

Also exports ExtractRepoPath for use outside the forge package, with validation to guard against malformed URLs returning garbage values.

Breaking Changes

  • None

Test Coverage

  • Unit tests added: 2 (pr placeholder substitution, zero-value behavior)
  • Integration tests added: 0

🤖 Generated with Claude Code

Add two new hook placeholders for PR checkout hooks:
- {pr-number}: PR/MR number (empty for non-PR checkouts)
- {pr-repo}: forge repo path, e.g. owner/repo (empty for non-PR checkouts)

Export ExtractRepoPath for use outside the forge package, with
validation to guard against malformed URLs.

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

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/wt/pr_cmd.go 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@raphi011
raphi011 merged commit eca7cb9 into main Mar 31, 2026
2 checks 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