Files
kilocode/packages/kilo-docs/pages/automate/code-reviews/github.md
T
kiloconnect[bot] 06cd80d1bd chore: enforce minimal markdown table formatting
Prettier pads markdown table cells for column alignment, which turns any
content change into a table-wide realignment diff. Markdown was only in
prettierignore for packages/kilo-vscode/; the root formatter still
repadded docs elsewhere (e.g. TESTING.md, kilo-docs, AGENTS.md).

Adds *.md to the root .prettierignore, documents the convention in
AGENTS.md, and adds script/check-md-table-padding.ts + a workflow to
enforce it. Existing padded tables in Kilo-owned docs have been
rewritten via the script's --fix mode.
2026-04-28 07:45:49 +00:00

107 lines
3.9 KiB
Markdown

---
title: "GitHub Code Reviews"
description: "Set up automated AI code reviews on GitHub pull requests"
---
# GitHub Code Reviews
Kilo's Code Reviews integrate with GitHub via a **GitHub App** to automatically review pull requests with AI. When a PR is opened, updated, or marked ready for review, the Review Agent analyzes the changes and posts feedback directly on the pull request.
## Prerequisites
- A Kilo Code account at [app.kilo.ai](https://app.kilo.ai)
- A GitHub account with access to the repositories you want to review
- Kilo Code credits for AI model usage
## Setup
### Step 1: Install the GitHub App
Connect your GitHub account via the [Integrations page](/docs/automate/integrations#connecting-github). Once connected, return here to configure the Review Agent.
The GitHub App requests the following permissions:
| Permission | Access | Purpose |
|---|---|---|
| Pull requests | Read & Write | Post review comments |
| Repository contents | Read | Analyze code |
| Issues | Read & Write | Post summary comments, reactions |
| Metadata | Read | List repositories |
### Step 2: Configure the Review Agent
1. Go to **Code Reviews**:
- **Personal**: [app.kilo.ai/code-reviews](https://app.kilo.ai/code-reviews)
- **Organization**: Your organization → Code Reviews
2. Toggle **Enable AI Code Review** to on
3. Configure your preferences:
- **AI Model** — Select from available models (default: Claude Sonnet 4.5)
- **Review Style** — Strict, Balanced, or Lenient
- **Repository Selection** — All repositories or select specific ones
- **Focus Areas** — Security, performance, bugs, style, testing, documentation
- **Max Review Time** — 5 to 30 minutes
- **Custom Instructions** — Add team-specific review guidelines
4. Click **Save Configuration**
### Step 3: Open a Pull Request
Once configured, the Review Agent automatically runs when:
| PR Event | Triggers Review |
|---|---|
| PR opened | ✅ Yes |
| New commits pushed to PR | ✅ Yes |
| PR reopened | ✅ Yes |
| Draft PR marked ready | ✅ Yes |
| Draft PR opened | ❌ Skipped |
| PR closed | ❌ No |
## What to Expect
When a review triggers:
1. A 👀 reaction appears on the PR — this means Kilo is reviewing
2. The AI model analyzes the diff and changed files
3. The agent posts:
- A **summary comment** with overall findings
- **Inline comments** on specific lines with issues and suggestions
- Severity tags (critical, warning, info)
### When You Push New Commits
- The previous review is **automatically cancelled** (no stale feedback)
- A new review starts for the latest commit
- If a previous summary comment exists, it is **updated in place**
## Repository Selection
- **All repositories** — Every repo accessible to the GitHub App triggers reviews
- **Selected repositories** — Only repos you choose in the configuration
The repository list is synced from GitHub and can be refreshed from the configuration page.
## Troubleshooting
### Reviews are not triggering
1. Verify the GitHub App is installed and has access to the repository
2. Check that the Review Agent is **enabled** in the Code Reviews configuration
3. Ensure the repository is in the allowed list (if using "Selected repositories" mode)
4. Confirm the PR is not a draft
### Reviews are failing
- Check the Code Reviews page for error details on specific reviews
- Ensure you have sufficient Kilo Code credits
- Very large PRs may time out — try increasing the max review time
### The GitHub App is missing permissions
1. Go to your GitHub Settings → Applications → KiloConnect → Configure
2. Verify the app has the required permissions listed above
3. If permissions were changed, you may need to re-authorize
### Duplicate comments
The system automatically deduplicates reviews for the same PR and commit SHA. If you see duplicate comments, this may be from a previous version — push a new commit to trigger a fresh review.