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

# GitHub

> Connect GitHub to ApiTraffic to auto-track commits, tags, and releases

Connecting GitHub installs the **ApiTraffic GitHub App** on the repositories you choose. The App delivers push, tag, and release events to ApiTraffic — you don't create any webhooks yourself.

> [!NOTE]
>
> You must be an ApiTraffic account **admin**, and a GitHub **org owner** (or repo admin) to install the App on the repositories you want to track.

## 1. Start the connection

In ApiTraffic, go to **Settings → Integrations → Git** and click **Connect GitHub**.

![Connect GitHub button in ApiTraffic git integration settings](https://app.apitraffic.io/images/docs/git/github-connect-button.png)

## 2. Install the ApiTraffic GitHub App

You'll be redirected to GitHub to install the App. Choose the organization (or personal account) to install into.

![GitHub App installation account selection](https://app.apitraffic.io/images/docs/git/github-install-account.png)

## 3. Choose repositories

Select **All repositories** or **Only select repositories** and pick the repos you want ApiTraffic to track, then click **Install**.

![GitHub App repository access selection](https://app.apitraffic.io/images/docs/git/github-select-repos.png)

> [!TIP]
>
> You can change which repositories the App can access later from **GitHub → Settings → Applications → ApiTraffic → Configure**.

## 4. Assign a repository to a bucket

Back in ApiTraffic, your connection now shows as **Active**. Pick a repository and choose the **bucket** whose API traffic that code powers.

![Assigning a GitHub repository to an ApiTraffic bucket](https://app.apitraffic.io/images/docs/git/github-assign-bucket.png)

## 5. Map branches to environments

Add one or more rows mapping a branch (or pattern) to an environment. Use the **Seed default** button to quickly create `main → your default environment`.

![Mapping GitHub branches to ApiTraffic environments](https://app.apitraffic.io/images/docs/git/github-branch-mapping.png)

## 6. Verify

Push a commit to a mapped branch. Within a few seconds a `git.push` marker appears on that bucket's charts.

![A git.push marker appearing after a GitHub push](https://app.apitraffic.io/images/docs/git/github-verify-marker.png)

## Disconnecting

* **In ApiTraffic:** Settings → Integrations → Git → **Disconnect** removes the link and stops tracking.
* **In GitHub:** uninstalling the App (Settings → Applications → ApiTraffic → Uninstall) also stops all tracking for that account immediately.

## Troubleshooting

> **A repository I want isn't listed**
>
> The App doesn't have access to it. In GitHub → Settings → Applications → ApiTraffic → Configure, add the repository, then refresh the ApiTraffic repo list.

> **No marker after pushing**
>
> Confirm the branch you pushed to is mapped to an environment. Unmapped branches are intentionally ignored.


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