Repository navigation
Conversation
|
Warning Review limit reachedNext included review available in 56 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Rebuild the template render/validation on main's _pr_template_path() (plan-dir aware), keep main's gh-stack and merge-base checks, and patch commit_exists in the execute test that main's new check now reaches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015rnEEjXWDBdePRhKMmZr1w
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015rnEEjXWDBdePRhKMmZr1w # Conflicts: # pr_split/cli.py
|
This change is already in Generated by Claude Code |
Summary
A custom
.pr-split/template.mdwas first rendered inside_create_single_pr— i.e. after every branch had been created and pushed — so a typo in the template surfaced only at PR-creation time, wrapped inPRCreationError. Attribute and index placeholders ({title.nope},{added[0]}) additionally escaped the friendly "Invalid PR template … Available placeholders …" handler becausestr.formatraisesAttributeError/TypeErrorfor them.Now
_render_pr_templatecatches all five error classes, and a newvalidate_pr_template()renders the template against sample values in_validate_inputs(skipped on--dry-run, which never opens PRs) and at the start ofexecute, so a bad template exits 1 with the friendly message before any branch exists — including before the re-split cleanup.Stacked on #150 (
fix/pr-body-length-cap), which touches the same function.Test plan
TestPrTemplateEarlyValidation: five bad placeholder shapes are friendly errors from both the validator and the real render; a valid template with format specs and escaped braces renders;_validate_inputsrejects a bad template (and skips it on dry run);executerejects it before the confirm prompt — all fail on the base