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

# GitHub Integration

> Connect your GitHub repositories to enable source code access and automated PRs

GitHub integration lets the traceroot Agent clone your repo in a sandbox, read the source code behind failing spans, and create fix PRs — all from within traceroot.

## Setup

1. Go to Workspace Settings -> Integrations in the traceroot dashboard and Connect GitHub App.
2. Grant access to the repositories you want to connect

![Workspace Settings Integrations page with GitHub and Slack connected](https://mintcdn.com/tracerootai/TLv21OVXbJzkJk5L/images/integrations_v1.png?fit=max\&auto=format\&n=TLv21OVXbJzkJk5L\&q=85\&s=c996e4e8c6679c49052a560fa52b825f)

Workspace Integrations: Connected Services with GitHub and Slack

## Permissions

| Permission | Access | Why |
| - | - | - |
| Metadata | Read-only | List repositories, collaborators, and access repository metadata (mandatory) |
| Contents | Read and write | Clone and read source code for debugging; create fix PRs |
| Pull requests | Read and write | Create fix PRs from root cause analysis; read PR context |
| Issues | Read and write | Create and manage issues; read issue context for debugging |
| Commit statuses | Read-only | Read commit statuses for trace correlation |
| Discussions | Read-only | Read discussions and related context |

## Requirements

For source code correlation to work:

* The traceroot GitHub App must have access to the repository
* Traces must include git context typically auto-detected by the SDK

> [!NOTE]
>
> Git context is captured automatically for every span when you use the `@observe` decorator. See [Git Context](https://traceroot.ai/docs/tracing/git-context.md).


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