feat(trail): guard --repo on approval and comment commands (review)

main

Commit

computermode2mo ago

Extend ensureTrailRepoHasTarget to the newly added approve, request-changes, approvals, and comment subcommands so a --repo override cannot silently resolve the local branch against another repo. Change the guard to take repoOverride instead of *cobra.Command so the approval/comment helpers can reuse it.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com Entire-Checkpoint: 01KXP4Z7XEDYS3HJJCRMK6SHDG

Checkpoints

Guard --repo on Approval and Comment Commands

Claude CodeOpus 4.8
View session
Checkpoint 1