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

# Connect GitHub repositories to Detail

> Install the Detail GitHub App to give Detail read access to scan your repositories and write access to open automated fix pull requests.

Detail integrates with GitHub through a GitHub App that you install on your personal account or organization. The app grants Detail read access to scan your repositories and write access to open pull requests for doc fixes or dead code.

## Installing the GitHub App

<Steps>
  <Step title="Sign in with GitHub">
    Go to [app.detail.dev](https://app.detail.dev) and sign in using GitHub OAuth.
  </Step>

  <Step title="Install the Detail GitHub App">
    After signing in, you'll be prompted to install the Detail GitHub App on your account or organization. Click **Install**.
  </Step>

  <Step title="Select repositories">
    Choose which repositories you want Detail to access. You can start with a single repository and expand later — you don't need to grant access to everything upfront.
  </Step>

  <Step title="Authorize the app">
    Complete the GitHub authorization flow. You'll be redirected back to the Detail dashboard once the app is installed successfully.
  </Step>
</Steps>

## Permissions Detail requests

Detail requests the minimum permissions needed to scan your code and open fix PRs.

| Permission        | Access | Purpose                                                                                |
| ----------------- | ------ | -------------------------------------------------------------------------------------- |
| **Code**          | Read   | Scan repository contents for bugs, security issues, dead code, and documentation drift |
| **Commits**       | Read   | Associate findings with the commit that introduced them                                |
| **Pull requests** | Read   | Read CI check results on existing PRs                                                  |
| **Pull requests** | Write  | Open automated fix PRs from Dead Code, Doc Fixes, and Pass-CI agents                   |
| **Webhooks**      | —      | Listen for push events, PR events, and check suite completions                         |

## Adding or removing repositories

You can adjust which repositories Detail can access at any time through two paths:

* **Via GitHub**: Go to **GitHub → Settings → Applications → Detail** and modify the repository list under *Repository access*.
* **Via Detail**: Go to **Settings → Repositories** in the Detail dashboard, then click **Add Repository** or **Remove from Detail**.

## GitHub Enterprise Server

Detail supports GitHub Enterprise Server (GHE) for teams on self-hosted GitHub installations.

Because GHE requires a custom GitHub App registration against your own hostname, this is handled on a per-organization basis. Contact the Detail team at [support@detail.dev](mailto:support@detail.dev) to configure a custom GitHub App for your GHE instance.

## How automated pull requests work

When Detail's Dead Code or Doc Drift scans find problems, they open a pull request in your GitHub repository. The PR includes a description of what was changed and why.

If CI checks fail on a Detail-created PR, Detail will update the branch automatically.

<Tip>
  Detail never pushes directly to your main or default branch. Every change goes through a pull request that you can review, request changes on, or close.
</Tip>
