Hamburger Cross Icon
CodeRabbit Collector - Lunar Collector

CodeRabbit Collector

Collector Experimental Code Analysis

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.

Add 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.

Collector code

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[].

coderabbit code review ai review pull request
Book a demo
Collector code

config

Detects CodeRabbit configuration files (.coderabbit.yaml or .coderabbit.yml) in the repository root. Records config file presence and path.

coderabbit config yaml configuration
Book a demo

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
1
Collectors Gather Data This Integration
Triggered by code changes or CI pipelines, collectors extract metadata from config files, tool outputs, test results, and scans
2
{ } Centralized as JSON
All data merged into each component's unified metadata document
3
Guardrails Enforce Standards
Real-time feedback in PRs and AI workflows

Example Collected Data

This collector writes structured metadata to the Component JSON. Here's an example of the data it produces:

{ } component.json Component JSON
{
  "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 GitHub

CodeRabbit 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.

View Repository

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.

Works with any process
check AI agent rules & prompt files
check Post-mortem action items
check Security & compliance policies
check Testing & quality requirements
Automate Now
Paste your AGENTS.md or manual process doc and get guardrails in minutes
Book a Demo