[luv-198] fix: skip no-conflicts policy when no OPEN PR exists#198
Conversation
…exists The policy used to run its local git merge-tree probe (Layer 1) unconditionally, so a branch with no PR on GitHub — or only a closed/merged one — could still receive a deny referencing a PR URL the user never created. Promote the gh + PR-state precheck above Layer 1 so the policy short-circuits to allow whenever there is no confirmable OPEN merge target, and reuse the fetched pr in Layer 2 to avoid a second gh round-trip. When gh CLI is unavailable, the entire policy is skipped (per user direction) — without gh we cannot confirm a PR exists. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
require-no-conflicts-before-stopused to run its localgit merge-treeprobe (Layer 1) unconditionally, so a branch with no PR on GitHub — or only a closed/merged PR — could still receive a deny that referenced a PR URL the user never created.gh+ PR-state precheck above Layer 1: whenghis unavailable, no PR exists, orpr.state !== "OPEN", the policy short-circuits toallowand never runs Layer 1. Layer 2 reuses thepralready fetched in the precheck — no secondgh pr viewcall.ghis not installed we skip the entire policy (withoutghwe cannot confirm a PR exists).Test plan
bun run test:run— 991 unit tests passbun run test:e2e— 207 e2e tests passbunx tsc --noEmit— cleanbun run lint— only a pre-existing unrelated warningmergeTreeStatus: 1) whenghis missing / no PR / PR is CLOSED"No pull request found for branch, skipping conflict check."and emits no URL🤖 Generated with Claude Code