utils: move code rabbit PR Template Validation to custom_checks - #5821
utils: move code rabbit PR Template Validation to custom_checks#5821RoniKishner wants to merge 1 commit into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: rkishner <rkishner@redhat.com>
|
Warning Review limit reached
Next review available in: 16 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 (1)
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 |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Branch Management
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
Security Checks
💡 Tips
📌 Additional InformationCustom Commands:
For more information, please refer to the project documentation or contact the maintainers. |
|
/verified |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Output rules: Your deliverable: Test Execution Plan
Use these formats:
Real test commands (MANDATORY when changes affect session/runtime code): When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
Example output for a session-startup fix: Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL — Verification rules for smoke and gating decisions: |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '=== Changed files (PR merge-base diff) ==='
git diff --name-status "$(git merge-base HEAD origin/main)" HEAD || git diff --name-status HEAD~1 HEAD
echo
echo '=== Diff ==='
git diff --unified=30 "$(git merge-base HEAD origin/main)" HEAD -- .coderabbit.yaml || \
git diff --unified=30 HEAD~1 HEAD -- .coderabbit.yaml
echo
echo '=== Config outline/content ==='
if [ -f .coderabbit.yaml ]; then
nl -ba .coderabbit.yaml | sed -n '1,260p'
fi
echo
echo '=== Pytest smoke markers (paths; may be empty) ==='
rg -l '`@pytest`\.mark\.smoke' tests 2>/dev/null || true
echo
echo '=== Pytest gating markers (paths; may be empty) ==='
rg -l '`@pytest`\.mark\.gating' tests 2>/dev/null || trueLength of output: 1491 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RedHatQE/openshift-virtualization-tests"
pr="5821"
echo '=== PR files and patches (in GitHub order) ==='
gh api --paginate "repos/${repo}/pulls/${pr}/files?per_page=100" \
--jq '.[] | {filename, status, additions, deletions, patch}'
echo
echo '=== Existing CodeRabbit inline review comments ==='
gh api --paginate "repos/${repo}/pulls/${pr}/comments?per_page=100" \
--jq '.[] | select(.user.login == "coderabbitai") | {id, path, line, side, body}' || true
echo
echo '=== Current CodeRabbit configuration ==='
nl -ba .coderabbit.yaml 2>/dev/null || true
echo
echo '=== Smoke marker files ==='
rg -l '`@pytest`\.mark\.smoke' tests 2>/dev/null || true
echo
echo '=== Gating marker files ==='
rg -l '`@pytest`\.mark\.gating' tests 2>/dev/null || trueLength of output: 7196 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo="RedHatQE/openshift-virtualization-tests"
pr="5821"
head_sha=$(gh api "repos/${repo}/pulls/${pr}" --jq '.head.sha')
body=$(cat <<'EOF'
## Test Execution Plan
- **Run smoke tests: False** — `.coderabbit.yaml` is review configuration only; no pytest code, fixtures, utilities, libraries, or `conftest.py` paths changed.
- **Run gating tests: False** — no gating-marked test has a dependency path to this PR-description custom-check configuration.
- **Affected pytest tests to run:** None.
**Configuration validation**
- Error path: open a PR body missing a required template heading or with an empty/placeholder `What this PR does / why we need it:` section. Expected: the `PR Template Sections` custom check reports a HIGH-severity failure.
- Happy path: use a complete PR body with meaningful `What this PR does / why we need it:` content and all required headings. Expected: `PR Template Sections` passes and the disabled built-in `description` check produces no duplicate finding.
EOF
)
gh api --method POST "repos/${repo}/pulls/${pr}/comments" \
-f body="$body" \
-f commit_id="$head_sha" \
-f path=".coderabbit.yaml" \
-F line=74 \
-f side="LEFT" >/dev/nullLength of output: 1402
|
What this PR does / why we need it:
Moves the PR template validation logic from a path-level instructions block to a dedicated custom_checks entry in .coderabbit.yaml, and switches the built-in description check to "off" to avoid duplicate enforcement.
Which issue(s) this PR fixes:
False alerts on PR's by code rabbit, saying missing parts in the description, for example:
#5819 (comment)
Special notes for reviewer:
The check behavior is unchanged, only the placement within the CodeRabbit config has moved. The description built-in was disabled because custom_checks now owns that validation.
jira-ticket: