fix: prevent PR targeting same branch and duplicated prefix#244
fix: prevent PR targeting same branch and duplicated prefix#244rubenmarcus merged 2 commits intomainfrom
Conversation
) - Use default branch (main/master) as base for first PR instead of originalBranch which could be an auto/* branch - Add getDefaultBranch() helper to detect main/master via git symbolic-ref - Strip existing conventional commit prefix from task title to prevent duplicated "feat: feat:" in PR titles Closes #208 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✔️ Bundle Size Analysis
Bundle breakdown |
Greptile SummaryFixes PR creation bug where auto mode would target the same branch as both head and base when running from an existing Key changes:
Note: The prefix-stripping regex on line 164 is more comprehensive (9 types) than the one in Confidence Score: 4/5
Important Files Changed
Last reviewed commit: 3c3d632 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c3d632ae9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address reviewer feedback: - Greptile: sync buildCommitMessage() prefix regex with cleanTitle regex (add style/ci/perf/build) - Codex: clarify getDefaultBranch() final fallback comment Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04e39e6225
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
originalBranchwhich could be anauto/*branch from a previous rungetDefaultBranch()helper that detects main/master viagit symbolic-refwith fallbackfeat: feat:in PR titlesRoot Cause
When auto mode runs on a branch that's already
auto/github-1, the first PR would targetauto/github-1as both head and base, causing "No commits between X and X" error.Test plan
ralph-starter autofrom main branch — first PR should target mainralph-starter autofrom an auto/* branch — first PR should still target main/masterfeat: feat:Closes #208
🤖 Generated with Claude Code