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

# GitHub

> Install the Superlog GitHub App so automations can check out your repositories and open pull requests.

GitHub gives automations their code. Every automation checks out at least one repository, and with GitHub connected the agent can read pull requests, commits, and issues, and open pull requests with its changes.

## Connect GitHub

**1. Start the install**

In **Integrations**, click **Add** on GitHub. Or, in the automation editor, click **Add GitHub** under **Repositories**.

**2. Install the app**

GitHub opens the Superlog GitHub App install page. Choose the account or organization and the repositories to grant.

**3. Pick repositories**

Back in Superlog, the granted repositories appear in **Add repository**. To grant more, change the app's repository access in GitHub.

## What automations can do

| Action | Details |
| - | - |
| Check out repositories | Up to 10 per automation, without git history. The first is the working directory. |
| Read GitHub | Pull requests, commits, comparisons, issues, files, and users in the granted repositories. |
| Fetch other refs | Bring another branch, tag, or pull request into the sandbox. |
| Open a pull request | Creates a branch from the agent's changes and opens a pull request against the checked-out branch. |

Pull requests open without an approval step. Use your branch protection and review rules as the gate before merge.

The sandbox never holds GitHub credentials. Superlog uses a short-lived installation token outside the sandbox and copies only the automation's repositories into it.

## Tag mode

Tag mode can read the repositories you select for it. It does not open pull requests.

## Self-hosted setup

Self-hosted deployments need their own public GitHub App.

| Setting | Value |
| - | - |
| OAuth redirect URI | `<public-url>/api/integrations/github/callback` |
| Webhook URL | `<public-url>/api/webhooks/github` |
| Webhook events | Pull request, Pull request review |

| Repository permission | Access |
| - | - |
| Contents | Read and write |
| Pull requests | Read and write |
| Metadata | Read |
| Actions | Read |
| Checks | Read |
| Commit statuses | Read |
| Issues | Read |

Also grant the account permission **Email addresses: Read**. Set `GITHUB_APP_ID`, `GITHUB_APP_SLUG`, `GITHUB_APP_PRIVATE_KEY`, `GITHUB_CLIENT_ID`, `GITHUB_CLIENT_SECRET`, and `GITHUB_WEBHOOK_SECRET`. See [Environment variables](https://docs.superlog.sh/self-hosting/environment.md).


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