> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autosana.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Bot

> Analyze PRs, run relevant flows, and get results with videos on your pull requests

Connect Autosana to your repositories. When you open a PR, Autosana analyzes the diff, selects and runs relevant flows, and posts results with videos as a PR comment.

<iframe src="https://www.veed.io/embed/e63be3a3-5838-4516-b4b6-13f92a9c90c6?watermark=0&color=default&sharing=1&title=1" width="744" height="504" frameBorder="0" title="Apps" allow="fullscreen" allowFullScreen />

## How it works

1. You open a PR
2. Autosana analyzes the diff and selects relevant flows (editing or creating as needed)
3. Flows run in parallel as your build completes
4. Results are posted as a PR comment with videos and a GitHub Check

## Setup

1. Go to **[Settings > Integrations > GitHub](https://autosana.ai/settings?tab=integrations\&integration=github)** and click **Install GitHub App**
2. Select your GitHub account/organization and choose repositories
3. Toggle **E2E Autopilot** per repo to automatically analyze and test PRs

Each repo also has a **Code Review** toggle for automatic AI code review on PRs — see [Code Review](/code-review). The two toggles are independent; enable both to get a review and test results on the same PR.

### If you aren't an owner of your GitHub organization

Click **Install GitHub App** anyway. GitHub sends your request to an owner of the organization. When the owner approves it, GitHub brings them to Autosana. They sign in with GitHub, see which workspace asked and who asked, and click **Confirm**. They don't need an Autosana account. Your repositories then appear in Settings.

If an owner installed the app straight from GitHub, Autosana gives them a link to send you. Open it, and **Settings > Integrations > GitHub** shows **Finish connecting GitHub**. Click **Link**. If you aren't an owner, Autosana asks one to confirm: click **Copy owner link** and send it to them. Each new copy turns off the previous link.

Settings shows where a connection stands and what to do next:

| Settings shows | What to do |
| - | - |
| Waiting for an owner of your GitHub org to approve | Wait for the owner, or click **Cancel** |
| An owner of *your org* needs to confirm | Click **Copy owner link** and send it to an owner, or click **Cancel** |
| No response from your GitHub owner yet | Click **Retry** |
| The app was removed from *your org* on GitHub | Click **Retry** |
| Finish connecting GitHub | Click **Link** |

<Note>
  You need to be an admin of your Autosana organization to install the GitHub App, link it, retry, copy an owner link, or cancel a request.
</Note>

Set up the [GitHub Action for App Uploads](/ci-cd-integration) so Autosana can access builds for each PR.

## Code-Managed Flows

Instead of authoring flows in the dashboard, you can define flows, suites, and hooks as files in your repository's `.autosana/` folder. Connect the repo in **[Settings > Integrations > GitHub](https://autosana.ai/settings?tab=integrations\&integration=github)**; Autosana automatically syncs `.autosana/` on every push to your default branch and previews changes on pull requests. Parse errors surface as line annotations on the **Autosana - Code-Managed Flows** GitHub check, and the resulting flows are read-only in the dashboard. See [Code-Managed Flows](/code-managed-flows).

## @autosana

Tag `@autosana` in a PR comment on any connected repository — no toggle needed. Ask questions, request specific tests, re-run failures, or adjust instructions. The agent responds as a PR comment.

## Managing Repositories

Go to **[Settings > Integrations > GitHub](https://autosana.ai/settings?tab=integrations\&integration=github)** and click **Manage Installation**. It opens the app's settings on GitHub, where you can add or remove repositories.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.