Add CodeRabbit review rules from PR review patterns - #8096
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Please specify an area label DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dgoodwin The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Please feel free to tell me this is slop and not useful. This is the third repo I'm trying, first two the teams felt this was useful. |
Analyzed recent merged PRs to identify recurring review feedback patterns and codified them as CodeRabbit path_instructions rules. These rules help catch common issues automatically during code review. Generated by teams:coderabbit-rules-from-pr-reviews
📝 WalkthroughWalkthroughThis change adds a new ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
0550074 to
1bed68d
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.coderabbit.yaml (1)
140-146: Scope the test-expectation text to non-test source changes.Because this instruction lives under
**/*.go, it also applies to*_test.gofiles; tightening wording avoids redundant “add tests” feedback on test-only PRs.♻️ Suggested wording tweak
- New exported functions and non-trivial logic changes should include unit - tests. Tests should cover: + For non-test Go source changes, new exported functions and non-trivial + logic changes should include unit tests. Tests should cover: 1. Happy path 2. Error/edge cases (malformed input, empty values, nil) 3. Platform-specific behavior for all relevant platforms (e.g., if adding AWS support, consider whether GCP/Azure also need test coverage) - Check that corresponding _test.go files are included in the PR. + Check that corresponding _test.go files are included in the PR when the + change is outside test files.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.coderabbit.yaml around lines 140 - 146, The test-expectation text under the rule that currently starts "New exported functions and non-trivial logic changes should include unit tests..." is too broad and triggers on *_test.go files; update that rule so it only applies to non-test Go sources by excluding test files (i.e., adjust the glob or add an exclusion so the rule no longer matches *_test.go). Edit the rule text associated with the "**/*.go" scope (the paragraph beginning "New exported functions...") to both tighten the wording and ensure the matcher excludes test-only files so PRs that only change *_test.go do not get the "add tests" reminder.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.coderabbit.yaml:
- Around line 140-146: The test-expectation text under the rule that currently
starts "New exported functions and non-trivial logic changes should include unit
tests..." is too broad and triggers on *_test.go files; update that rule so it
only applies to non-test Go sources by excluding test files (i.e., adjust the
glob or add an exclusion so the rule no longer matches *_test.go). Edit the rule
text associated with the "**/*.go" scope (the paragraph beginning "New exported
functions...") to both tighten the wording and ensure the matcher excludes
test-only files so PRs that only change *_test.go do not get the "add tests"
reminder.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 67c725d4-e6d0-407b-8a2d-c2f23389622c
📒 Files selected for processing (1)
.coderabbit.yaml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8096 +/- ##
=======================================
Coverage 26.56% 26.56%
=======================================
Files 1087 1087
Lines 105042 105042
=======================================
Hits 27902 27902
Misses 74731 74731
Partials 2409 2409 🚀 New features to boost your workflow:
|
|
@dgoodwin: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/close |
|
@dgoodwin: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
This PR adds CodeRabbit review rules to
.coderabbit.yamlbased on patternsidentified from analyzing recent merged PR review comments. These rules encode
recurring feedback from human reviewers so that CodeRabbit can catch the same
issues automatically in future PRs.
How these were identified
Analyzed the most recent 100 merged PRs and collected 480 human review comments
from 24 unique reviewers (excluding bots, approvals, and prow commands). Patterns
appearing in 3+ PRs or from 2+ different reviewers were proposed as rules.
Top reviewers represented: JoelSpeed (117), jparrill (113), enxebre (65),
bryan-cox (51), sdminonne (31), cblecker (23).
Re-running
This command can be re-run periodically to identify new patterns:
It compares against existing rules and only proposes net-new additions.
Generated by
teams:coderabbit-rules-from-pr-reviewsSummary by CodeRabbit