What you get
When a Linear issue gets the label you choose, such asready-for-agent, CodeRabbit implements a focused fix, runs the relevant tests, and opens one pull request in the GitHub repository you pick. The pull request has a summary, test evidence, and a link to the Linear issue, and CodeRabbit comments the pull request link with a one-line summary on the issue. It doesnât change issue fields or merge the pull request.
Before you start
Once Linear is connected and in scope, any workspace member can create the automation.
Set it up
1
Open the template
Open Automations > Home and select Implement code changes under Templates. On the Implement PRs for labeled tickets card, under Choose your ticketing system, choose Linear and select Set up. The editor opens with Create PR from Linear issue as the name, a Linear trigger on the
Issue.create and Issue.update events, the agent instructions, and two targets.2
Choose the Linear connection and teams
In the Trigger card, choose the Linear connection. Under Linear teams, keep All public teams or select the teams whose issues can start a run.If the editor says the connection needs scope setup, select Set up Base Scope or Configure Base Scope and add the connection. You canât save the automation until then.
3
Choose the label
The Filter row is set to Has label. Under Label name, search for the label and pick it from your Linear labels, so create it in Linear first. The label is required.
4
Review the agent instructions
The template tells CodeRabbit to implement a focused fix, run the relevant tests, open one pull request in the selected repository, post the pull request link on the Linear issue, and not change issue fields or merge. Add whatâs specific to your code, such as the test command or directories it must not touch. See Write agent instructions.
5
Choose the repository
In the GitHub repository target, choose the Repository. The picker lists only repositories where the CodeRabbit GitHub App is installed and active. The repository is required.
6
Choose the Linear connection for the comment
In the Linear target, choose the Connection. This targetâs instruction is fixed: post one comment with the pull request link and a one-line summary.
7
Save
Set the toggle next to the name to Active and select Save automation. CodeRabbit creates the Linear webhook, so there is nothing to set up in Linear.
Test it
Create a test issue in one of the selected teams, or open an existing one, and add the label. Keep the issue small and well described, so the first pull request is easy to review. Every time an issue gets the label, a new run starts, including when you remove the label and add it again. A redelivery of the same event from Linear doesnât start a second run. See Deduplication.Check the runs
Open the automation from Automations > Home. Overview > Recent runs shows the latest runs; select View all, or open Run history, and select Open run under Previous runs to see what a run did. See Automation details. The run summary shows what CodeRabbit reported, and there is no separate column for the pull request. A successful run leaves:- A pull request in the repository, opened by the CodeRabbit GitHub App, with a summary, test evidence, and a link to the Linear issue.
- A comment on the Linear issue with the pull request link and a one-line summary.
Variations
- Start on a status instead of a label. Set the Filter row to Has status to start a run when an issue is created in a status or moves to it.
- Jira or GitHub Issues. On the same card, choose Jira or GitHub Issues to open the Create PR from Jira issue or Create PR from GitHub issue template. Has status isnât available for GitHub.
- Several repositories. An automation opens pull requests in one repository. For several repositories, create one automation per repository, each with its own label or Linear teams.
- Triage first. Let CodeRabbit comment a likely cause and fix on new issues, and add the label to the ones worth implementing. See Triage new engineering tickets.
Whatâs next
Triage new engineering tickets
Get a likely cause and suggested fix on every new issue before you label it.
Automation destinations
Learn how GitHub repository and connection targets deliver results.
Manage and monitor automations
Follow runs, pause the automation, and control its spend.