fix(ci): harden PR target draft conversion and issue-quality Version gates - #631
Conversation
Grant contents:write so convertPullRequestToDraft works with GITHUB_TOKEN, record autoDraftedByBot only after success, and keep enforce-target red even when GraphQL draft mutation fails.
|
Warning Review limit reached
Next review available in: 10 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR hardens PR target enforcement with explicit permissions, best-effort state mutations, accurate comments, and hard failures for invalid targets. It also tightens new bug-report validation for versions, reproductions, and operating systems with expanded tests. ChangesPR target enforcement
Issue quality validation
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant GitHubAPI
participant PRComment
participant RequiredCheck
GitHubActions->>GitHubAPI: Attempt draft conversion
GitHubAPI-->>GitHubActions: Success or failure
GitHubActions->>PRComment: Upsert wrong-target explanation
GitHubActions->>RequiredCheck: Mark check failed
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Close the lidge-jun#624 gap where Version like Unknown/모름 and title-like Reproduction still passed the new bug form.
…uality Checkpoint ownership before mutations, keep active state when ready conversion fails, assert permissions without comment false-positives, and share unusable env stand-in detection for Version/OS.
Security review (maintainer, merge gate)
|
Transition complete
Go decisionNo Go counterpart — CI workflows ( |
Summary
enforce-pr-target: grantcontents: writeso draft GraphQL works withGITHUB_TOKEN, soft-fail draft/ready mutations, recordautoDraftedByBotonly after success, and always fail the required check on a wrong base (seen on [WRONG BRANCH] fix: stabilize cache inputs #626).issue-quality: reject unusable Version values (Unknown/Uknown/모름/idk/ …), require Version + OS on the new bug form, and reject vague title-like Reproduction text (Unexpected interruption continues to occur #624).Notes
pull_request_target). Explicit security review required before merge.pull_request_targetbehavior for fork PRs only updates after promotion to the repository default branch as well asdev.Test plan
node --test .github/scripts/enforce-pr-target.test.cjsnode --test .github/scripts/issue-quality.test.cjsbun test tests/ci-workflows.test.tsbun run typecheckbun run privacy:scanpull_request_targetsurfaceenforce-target; Unknown-Version bug issues are quality-rejectedSummary by CodeRabbit
Bug Fixes
Quality Improvements