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

# Integrating with GitHub

> Learn how to integrate CodSpeed with a GitHub repository.

## Setup

1. Go to your [CodSpeed settings](https://app.codspeed.io/settings)

   > [!NOTE]
   >
   > If you are importing a repository from an organization, you need to be either
   > a **Provider Admin** or a **Admin** of this organization. Check out the
   > [CodSpeed Roles & Permissions page](https://codspeed.io/docs/features/roles-and-permissions.md) for more
   > information.

2. Click the "Import" button:

   ![Adding a new repository from the settings page](https://mintcdn.com/codspeed/jKaxX6yy-Kzw1C-0/assets/add-new-repository.png?fit=max\&auto=format\&n=jKaxX6yy-Kzw1C-0\&q=85\&s=84fb767d81b990e9ba590bf2a8adc0c8)

3. Select the organization or the user you want to import the repository from:

   ![Github App organization selection](https://mintcdn.com/codspeed/jKaxX6yy-Kzw1C-0/assets/select-organization.png?fit=max\&auto=format\&n=jKaxX6yy-Kzw1C-0\&q=85\&s=04ad62074c1d5b91f6f90748cf3067f2)

4. Select the repositories you want to benchmark and click on "Install"

5. Your repositories should appear in the list of repositories.

   ![Repositories list after installation](https://mintcdn.com/codspeed/SwdNrtJu0iSVsYr5/assets/github-connect-repo.png?fit=max\&auto=format\&n=SwdNrtJu0iSVsYr5\&q=85\&s=291bd83ddc1141ab0d49028e4b4da39c)

You can now continue and [setup the continuous reporting](https://codspeed.io/docs/integrations/ci.md).

## GitHub Permissions

CodSpeed requires the following permissions to work properly with GitHub:

### Account permissions

* **Email addresses (Read-only)**: required to notify users about installation
  and configuration changes.

> [!NOTE]
>
> **Act on your behalf**
>
> When you connect CodSpeed to your GitHub account, you might see a message saying
> the app wants to “Act on your behalf.” This message is a display inconsistency
> on GitHub's side and doesn't reflect what CodSpeed can actually do.
>
> ![GitHub Authorization Request](https://mintcdn.com/codspeed/Dt-_mEYL876ID0AT/assets/github-act-on-your-behalf.png?fit=max\&auto=format\&n=Dt-_mEYL876ID0AT\&q=85\&s=068da8abf117de45feb9afc30dd758e7)
>
> The only permission CodSpeed requires from your personal GitHub account is read
> access to your email address, which allows us to identify your account and
> contact you if needed.
>
> All interactions will otherwise be performed through the CodSpeed GitHub App,
> which is installed on repositories you authorize but anyway, CodSpeed can
> **never** perform actions on your behalf. For more technical background, see
> [this GitHub discussion](https://github.com/orgs/community/discussions/37117).

### Repository Permissions

* **Actions (Read/Write)**: required to access the runs, jobs, and execution
  logs of CodSpeed workflows.

* **Checks (Read/Write)**: required to create check runs for the
  [performance reports](https://codspeed.io/docs/integrations/providers.md#performance-reports-in-pull-requests),
  and to let the [Wizard](https://codspeed.io/docs/ai/wizard.md) read the checks of the pull requests it
  works on.

* **Commit statuses (Read-only)**: required to access commit status checks.

* **Contents (Read/Write)**:
  * Read access: required to access branches and commits.
  * Write access: required to recommend performance improvements by pushing
    commits to a dedicated branch.

    > [!NOTE]
    >
    > This permission does not bypass any branch protection rules you have set
    > up on your repository

* **Pull requests (Read/Write)**: required to access pull requests and annotate
  them with
  [performance reports](https://codspeed.io/docs/integrations/providers.md#performance-reports-in-pull-requests)
  comments.

* **Issues (Read/Write)**: required to access issues and respond to issue
  comments mentioning [@codspeedbot](https://codspeed.io/docs/ai/wizard.md).

* **Metadata (Read-only)**: mandatory for all GitHub Apps.

* **Workflows (Write)**: required to [automate CodSpeed setup](https://codspeed.io/docs/ai/wizard.md) on
  repositories.

### Organization permissions

* **Members (Read-only)**: required to access the list of members of the
  organization.

* **Self-hosted runners (Read/Write)**: required to register
  [CodSpeed Macro runners](https://codspeed.io/docs/instruments/walltime.md) at the organization level.

> [!NOTE]
>
> If you have any concerns about the permissions we require, please
> [contact us](mailto:support@codspeed.io).


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