CodeRabbit
By integrating CodeRabbit with DX, you can import CodeRabbit’s AI code review metrics—per-pull-request review activity, comment breakdowns, and daily user activity—and link it to the rest of your DX data to analyze impact. Please refer to the API documentation below and our schema explorer to see what data DX imports—note that DX does not read or access your source code.
Prerequisites
To connect CodeRabbit to DX, you need:
- a CodeRabbit Enterprise plan. The CodeRabbit API is only available to Enterprise subscribers; other plans return a
403 Forbidden(API access requires an Enterprise plan subscription). - an API key created from the CodeRabbit dashboard by an organization admin.
Setup instructions
Follow the steps below to connect CodeRabbit to DX.
Step 1
Create a CodeRabbit API key:
- Sign in to the CodeRabbit dashboard as an organization admin.
- Open your Organization Settings.
- Go to the API Keys section and create a new key.
- Give the key a name, such as DX Integration, create it, and copy the value. Store it somewhere safe—the key is only shown once.
Step 2
- Navigate to the connections page in DX and select + Connection in the top right.
- Enter the API key you copied in the previous step. Refer to the information below for errors and troubleshooting.
API reference
The table below lists the specific API endpoints that are used by DX. All requests are sent to https://api.coderabbit.ai and authenticated with the x-coderabbitai-api-key header.
| Endpoint | Documentation |
|---|---|
| GET /v1/metrics/reviews | Link |
| GET /v1/users | Link |
DX imports the seat-assigned users from /v1/users and per-pull-request review metrics from /v1/metrics/reviews (windowed by merge date), including estimated review time, complexity, and comment counts broken down by severity and category. CodeRabbit users are linked to DX users via their Git provider user id.
Errors
The table below lists potential error codes when adding a connection in DX.
| Error | Description |
|---|---|
invalid_credentials |
The API key entered is not valid, or your plan does not include API access. |
no_resources |
DX cannot access any review metrics for your organization. |