# Quickstart with automations

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/air/llms.txt).

In this quickstart, you set up an automation that reviews every pull request in a GitHub repository and posts its findings as comments on the pull request. Then you open a pull request and check what the run did.

<a id="automations_quickstart_before_you_start"></a>

## Before you start

* You have completed the Air Teams onboarding – see [1. Complete onboarding](https://www.jetbrains.com/help/air/quickstart-with-cloud-agents.html.md#cloud_quickstart_onboarding).

* The repository is on GitHub and covered by the JetBrains Air app installation – see [Connect repositories](https://www.jetbrains.com/help/air/connect-repositories.html.md). You'll need to open a pull request in it.

* Every run spends AI credits. This automation runs once each time a pull request is opened or pushed to.

<a id="automations_quickstart_presets"></a>

## 1. Check the automations you already have

On the Choose Automations step of the onboarding, Air Teams offers ready-made automations for the repository you connected. Each one is a built-in [template](https://www.jetbrains.com/help/air/automation-templates.html.md) with its trigger and change handling already chosen, and it goes live as soon as the setup finishes.

The automations you turned on are listed on the Automations page: under Project if the onboarding created a project, otherwise under Personal. They're ordinary automations, so you can edit, pause, or delete them like any other. Their runs spend your personal AI credits until a project admin switches the project to its shared credits – see [AI credits for project automations](https://www.jetbrains.com/help/air/project-automations.html.md#project_ai_credits).

If you turned on Code review, skip to [3. Open a pull request](#automations_quickstart_open_pr).

<a id="automations_quickstart_create"></a>

## 2. Create a code review automation

<a id="automations_quickstart_create_procedure"></a>

Procedure: Create an automation from the Code Review template

1. Open [https://air.jetbrains.cloud](https://air.jetbrains.cloud), go to the Automations page, and click New Automation.

2. In Instructions, click Use Template, and in the Automation Templates dialog, select Code Review under By Air. The form fills in with the template's name and instructions. The template doesn't set a trigger – you choose it in the next steps.

![The Automation Templates dialog with the search field and the By Air group of built-in templates, including Code Review](images/automation-use-template-dialog.png)

3. Click Select repository and select your GitHub repository. Keep Personal in the scope selector next to it.

![The new automation form filled in from the Code Review template: the name Code Review, Personal scope, the selected GitHub repository, and the template instructions](images/automations-quickstart-code-review-form.png)

4. In Triggers, click Add Trigger and select `GitHub | Pull request | Opened`.

![The Add Trigger menu with At time, Repeat every, GitHub, Jira, Automation finished, and Webhook](images/automation-add-trigger-menu.png)

5. Click Show filters on the trigger row and select Ignore drafts, so the agent doesn't review work that isn't ready. Leave the other filters empty – an empty filter matches every pull request.

6. Set what the trigger does with the changes to No code changes. The review is posted on the pull request, so the run has nothing to commit.

![The Triggers section with two GitHub triggers, PR opened and PR has new changes, each set to No code changes, with its filters shown and Ignore drafts selected](images/automations-quickstart-code-review-triggers.png)

7. To review the pull request again after every push, add a second trigger, `GitHub | Pull request | New changes`, with the same filter and No code changes. Skip this step to review each pull request only once.

8. Click Create.

<a id="automations_quickstart_open_pr"></a>

## 3. Open a pull request

In the repository, open a pull request that isn't a draft. Air Teams receives the event from GitHub and starts a run. When the run finishes, the review is on the pull request: an inline comment for each finding, with its failure scenario and a suggested fix, and a verdict – Request changes if any finding blocks the merge, otherwise Approve.

Marking a draft as ready for review doesn't start a run, because Opened fires only when a pull request is created. To review those pull requests too, add a `GitHub | Pull request | Moved out of draft` trigger – see [GitHub events](https://www.jetbrains.com/help/air/automation-triggers.html.md#automation_trigger_github_events).

<a id="automations_quickstart_check_run"></a>

## 4. Check the run

<a id="automations_quickstart_check_run_procedure"></a>

Procedure: Check what the run did

1. On the Automations page, select the automation.

2. In the Runs section, click the run. The run page shows its summary.

3. To see what the agent read and why it reached its verdict, click Show full chat.

If no run appeared, or the review isn't what you expected, see [Troubleshoot automations](https://www.jetbrains.com/help/air/troubleshoot-automations.html.md).

<a id="automations_quickstart_next"></a>

## Where to go next

* Make the review yours – edit the instructions to add your team's conventions, or files the agent should skip. See [Edit an automation](https://www.jetbrains.com/help/air/manage-automations.html.md#edit_automation).

* Share it with your team – move the automation to a project so it runs for everyone. See [Personal and project automations](https://www.jetbrains.com/help/air/create-automation.html.md#automation_sharing).

* Hear about finished runs – failed runs are emailed to you already. To get every run's summary in Slack, add a webhook notification. See [Automation notifications](https://www.jetbrains.com/help/air/automation-notifications.html.md).

* Automate the next workflow – browse the other built-in templates. See [Automation templates](https://www.jetbrains.com/help/air/automation-templates.html.md).

