Skip to content

Commit 98952fd

Browse files
authored
feat: add CodeRabbit AI review configuration (#936)
Configure CodeRabbit in chill mode to provide automated PR summaries and walkthroughs alongside GitHub Copilot. Enable the request changes workflow to allow CodeRabbit to signal LGTM/approval once checks pass. Update README.md and CONTRIBUTING.md to document the updated AI-assisted code review workflow. TAG=agy CONV=b35d43c9-d368-4f61-b5a2-1cef96c2ea7b
1 parent b410ffb commit 98952fd

4 files changed

Lines changed: 20 additions & 11 deletions

File tree

.coderabbit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: en-US
3+
reviews:
4+
request_changes_workflow: true

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ By submitting this PR, you acknowledge our [Contributing Guidelines](https://git
3030
3131
* CLA REQUIRED: You must sign the Kubernetes CLA before your PR can be reviewed.
3232
* AI REVIEWS:
33-
* We use Copilot for initial reviews. Do NOT click "Commit suggestion" in the GitHub UI, as Copilot cannot sign the CLA and will block your PR. Please apply suggestions locally instead.
34-
* Once Copilot finishes the first pass, please resolve its comments so the PR can be labeled `ready-for-review` for maintainers!
33+
* We use Copilot and CodeRabbit for initial reviews. Do NOT click "Commit suggestion" in the GitHub UI, as AI bots cannot sign the CLA and will block your PR. Please apply suggestions locally instead.
34+
* Once automated reviews finish the first pass, please resolve their comments so the PR can be labeled `ready-for-review` for maintainers!
3535
* PR TAKEOVERS: To speed up delivery, maintainers may push final changes and directly merge your PR if it is close to completion.
3636
* STALE POLICY: PRs inactive for 30 days are marked stale and closed 15 days later.
3737
=======================================================================

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ We have full documentation on how to get started contributing here:
1717
To maintain high velocity and prevent our review queue from stagnating, this project enforces the following guidelines for all Pull Requests:
1818

1919
- **CLA Requirement:** All contributors must sign the [Contributor License Agreement](https://git.k8s.io/community/CLA.md). PRs without a signed CLA will not be reviewed.
20-
- **AI-Assisted Code Reviews:** We use GitHub Copilot to provide automated, first-pass code reviews to help identify low-hanging fruit and improve review velocity.
21-
- If Copilot provides a code suggestion in your PR, **do not click the "Commit suggestion" button** in the GitHub UI. Doing so adds Copilot as a co-author to the commit. Since Copilot cannot sign the Kubernetes CLA, this will cause the CLA check to fail and block your PR. Instead, please manually apply the suggested changes in your local environment and push the commit yourself.
20+
- **AI-Assisted Code Reviews:** We use GitHub Copilot and CodeRabbit to provide automated, first-pass code reviews to help identify low-hanging fruit and improve review velocity.
21+
- **⚠️ Important Contribution Note (CLA Requirement):** If Copilot or CodeRabbit provides a code suggestion in your PR, **do not click the "Commit suggestion" button** in the GitHub UI. Doing so adds the AI bot as a co-author to the commit. Since bots cannot sign the Kubernetes CLA, this will cause the CLA check to fail and block your PR. Instead, please manually apply the suggested changes in your local environment and push the commit yourself.
22+
- **GitHub Copilot:** If your organization or GitHub account has Copilot enabled, you can interact with Copilot directly in the PR comment threads by tagging `@copilot` or clicking the Copilot sparkle icon to ask questions, explain code, or suggest fixes.
23+
- **CodeRabbit:** CodeRabbit provides automated PR summaries, walkthroughs, and high-level reviews. It is configured to signal approval once checks pass and issues are resolved. You can interact with it by commenting `@coderabbitai` on your PR (e.g., `@coderabbitai review` to request an incremental re-review, or `@coderabbitai full review` to re-evaluate the entire PR from scratch).
2224
- **AI Agent Skills:** We provide instructions for AI agents in the [`.agents/skills/`](.agents/skills/) directory. These skills guide AI assistants to follow project conventions and rules. Contributors using AI tools are encouraged to reference these skills.
2325
- **Fast-Track Delivery (PR Takeovers):** To focus on delivering features faster, maintainers may take over community PRs that are approved or highly important. If a PR is close to completion, a maintainer might push the final changes and merge it directly.
2426
- **Stale Management:** We have shifted to a more aggressive rule for inactive PRs to reduce queue clutter. Any PR that is inactive for 30 days will be automatically marked stale (`lifecycle/stale` label) and closed after 15 more days of inactivity. Closed PRs can always be reopened if the author returns to continue the work.

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,16 @@ This is a community-driven effort, and we welcome collaboration!
166166

167167
### AI-Assisted Code Reviews (Experimental)
168168

169-
To help improve our review velocity, we are currently experimenting with AI-assisted code reviews, starting with GitHub Copilot as our automated first-pass reviewer. Here is the workflow:
170-
171-
1. Copilot will be assigned as the first reviewer of all open PRs (skipping PRs without a signed CLA)
172-
1. After Copilot reviews are posted, the PR will be labeled `action-required: resolve-copilot-comments`
173-
* **⚠️ Important Contribution Note:** If you receive a code suggestion from Copilot in your PR, please don't directly apply suggestions via the GitHub UI. It will set Copilot as co-author and break the Kubernetes CLA requirements. For more information, read our [Contributing Guidelines](CONTRIBUTING.md).
174-
1. After all of Copilot reviews are marked resolved, the PR will be labeled `ready-for-review`
175-
1. Maintainers will review `ready-for-review` PRs and provide final approval
169+
To help improve our review velocity, we are currently experimenting with AI-assisted code reviews using GitHub Copilot and CodeRabbit as our automated first-pass reviewers. Here is the workflow:
170+
171+
1. Copilot and CodeRabbit will automatically review open PRs (skipping draft PRs and PRs without a signed CLA).
172+
1. After automated reviews are posted, the PR will be labeled `action-required: resolve-copilot-comments`.
173+
* **⚠️ Important Contribution Note (CLA Requirement):** If you receive a code suggestion from Copilot or CodeRabbit in your PR, please don't directly apply suggestions via the GitHub UI. It will set the AI bot as co-author and break the Kubernetes CLA requirements. For more information, read our [Contributing Guidelines](CONTRIBUTING.md).
174+
1. **Interacting with AI Reviewers:**
175+
* **GitHub Copilot:** If your organization or account has Copilot enabled, you can interact with Copilot directly in PR comment threads by tagging `@copilot` or clicking the Copilot sparkle icon to ask questions, explain code, or suggest fixes.
176+
* **CodeRabbit:** CodeRabbit provides high-level summaries and walkthroughs, and acts as an automated gatekeeper that approves the PR once all issues are resolved. You can interact with it by commenting `@coderabbitai` on your PR (e.g., `@coderabbitai review` to request an incremental re-review, or `@coderabbitai full review` to re-evaluate the entire PR from scratch).
177+
1. After automated review comments are addressed or marked resolved, the PR will be labeled `ready-for-review`.
178+
1. Maintainers will review `ready-for-review` PRs and provide final approval.
176179

177180
We actively welcome your feedback on the quality, relevance, and helpfulness of these automated reviews! As we iterate on this process, we also plan to evaluate and test different AI review tools to find the best fit for our project's workflow.
178181

0 commit comments

Comments
 (0)