CodeRabbit Collector
Detects CodeRabbit AI code review activity on pull requests by querying GitHub check-runs API, and collects CodeRabbit configuration files. Writes to normalized ai.code_reviewers[] for tool-agnostic policy checks, plus tool-specific data in ai.native.coderabbit.
coderabbit to your lunar-config.yml:uses: github://earthly/lunar-lib/collectors/coderabbit@v1.0.5
What This Integration Collects
This integration includes 2 collectors that gather metadata from your systems.
code-reviewer
Detects CodeRabbit check-runs on pull requests by querying the GitHub check-runs API for the coderabbitai app. Waits for scan completion and writes a normalized entry to ai.code_reviewers[].
config
Detects CodeRabbit configuration files (.coderabbit.yaml or .coderabbit.yml) in the repository root. Records config file presence and path.
How Collectors Fit into Lunar
Lunar watches your code and CI/CD systems to collect SDLC data from config files, test results, IaC, deployment configurations, security scans, and more.
Collectors are the automatic data-gathering layer. They extract structured metadata from your repositories and pipelines, feeding it into Lunar's centralized database where guardrails evaluate it to enforce your engineering standards.
Learn How Lunar Works →Example Collected Data
This collector writes structured metadata to the Component JSON. Here's an example of the data it produces:
{
"ai": {
"code_reviewers": [
{
"tool": "coderabbit",
"check_name": "coderabbitai",
"detected": true,
"last_seen": "2024-01-15T10:30:00Z"
}
],
"native": {
"coderabbit": {
"config_file": ".coderabbit.yaml",
"config_exists": true
}
}
}
}
Configuration
Configure this collector in your lunar-config.yml.
Secrets
This collector requires the following secrets to be configured in Lunar:
| Secret | Description |
|---|---|
GH_TOKEN
|
GitHub token for API access (required for code-reviewer collector) |
Documentation
View on GitHubCodeRabbit Collector
Detect CodeRabbit AI code review activity and configuration across repositories.
Overview
This collector detects CodeRabbit usage on pull requests by querying GitHub check-runs for the coderabbitai app, and discovers CodeRabbit configuration files in the repository. It writes to the normalized ai.code_reviewers[] array for tool-agnostic policy checks, and stores CodeRabbit-specific data in ai.native.coderabbit.
Collected Data
This collector writes to the following Component JSON paths:
| Path | Type | Description |
|---|---|---|
.ai.code_reviewers[] |
array entry | Normalized code reviewer entry: tool name, check name, detection status, last seen timestamp |
.ai.native.coderabbit.config_file |
string | Path to the CodeRabbit config file (.coderabbit.yaml or .coderabbit.yml) |
.ai.native.coderabbit.config_exists |
boolean | Whether a CodeRabbit config file exists in the repository |
Collectors
This integration provides the following collectors:
| Collector | Hook | Description |
|---|---|---|
code-reviewer |
code (PRs only) |
Detects CodeRabbit check-runs on PRs via GitHub API |
config |
code |
Discovers .coderabbit.yaml / .coderabbit.yml config files |
Installation
Add to your lunar-config.yml:
collectors:
- uses: github://earthly/lunar-lib/collectors/coderabbit@main
on: ["domain:your-domain"]
secrets:
GH_TOKEN: "${{ secrets.GH_TOKEN }}"
Open Source
This collector is open source and available on GitHub. Contribute improvements, report issues, or fork it for your own use.
Common Use Cases
Explore guardrails that use data from CodeRabbit Collector.
Ready to Automate Your Standards?
See how Lunar can turn your AGENTS.md, engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 100+ built-in guardrails.