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

# GitHub AI Connector

> Give Rootly AI read-only access to GitHub repositories, commits, pull requests, issues, releases, code, and ownership context.

## Overview

GitHub is a one-click connector that gives Rootly AI read access to the repositories covered by your Rootly AI GitHub App installation. During an investigation, Rootly AI can inspect recent commits and pull requests, search code, read repository files, and look up repository or team ownership context without a responder switching tabs.

Every exposed tool is **read-only**. Rootly pins a reviewed set of GitHub MCP tools and sends GitHub read-only mode on every request. Rootly AI cannot push code, comment on issues or pull requests, merge changes, or modify repositories.

***

## Before You Start

* **A GitHub organization** you have permission to install third-party GitHub Apps on.
* **Permission to install the Rootly AI GitHub App** for that organization — GitHub org **Owners** can install directly; other roles need install rights granted by an Owner.

***

## Setup

Open **AI SRE → Atlas → Connectors** (**AI & Agents → Connectors** if your sidebar doesn't have an **AI SRE** item) and click **Connect** on the GitHub card. Enter a **Connection name** and confirm to open GitHub's authorization flow. Sign in to GitHub and install the **Rootly AI GitHub App** for the organization you want to connect — choose **All repositories** for broad coverage, or **Only select repositories** to scope Rootly AI to a specific set. When the install completes, the card flips to **Connected**.

***

## What Rootly AI Can Read

* **Repositories and refs** — repository search, branches, tags, and releases.
* **Commits and code** — commit lookup and search, commit history, code search, and bounded repository-file contents.
* **Pull requests and issues** — list, search, and read operations, including pull request details and diffs supported by GitHub's MCP tool.
* **Ownership context** — teams, team members, repository collaborators, users, issue metadata, and labels.

<Tip>
  Rootly AI reaches for GitHub when a question is about *"what changed?"* — pairing it with an observability connector (Sentry, Datadog) gives the strongest "what caused this?" signal.
</Tip>

***

## During an Incident

*"This error started after this pull request merged. Here's the diff that likely caused it."*

Rootly AI correlates a spike in errors with commits and merged pull requests around the affected window, then reads the relevant diff or repository file when the evidence points to a code path. The investigation can cite the source change and use team or collaborator data to identify likely ownership without claiming that GitHub supplied deployment telemetry it doesn't expose.

***

## Best Practices

* **Install with broad repo access.** Rootly AI can only see repositories the GitHub App installation covers. Selecting a narrow set means Rootly AI can't find a relevant commit, pull request, release, or file in an unselected repository — choose **All repositories** unless you have a specific reason to restrict.
* **Keep repository and team ownership current.** Rootly AI can read team members, collaborators, and repository files such as CODEOWNERS when it knows the path. Stale GitHub ownership data leads to stale suggestions.
* **Pair with a CI/CD connector.** GitHub tells Rootly AI what changed; a CI connector (Semaphore, or your team's own via [Custom](/ai/connectors/custom)) tells it whether the deploy pipeline succeeded.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Some repositories return no data even though the card shows Connected" icon="key">
    The Rootly AI GitHub App installation doesn't cover those repos. On the GitHub side, open **Settings → GitHub Apps → Rootly AI → Configure**, then either switch to **All repositories** or add the missing repos to the selected list. Rootly AI will pick up the new scope on the next investigation — no reconnect needed.
  </Accordion>

  <Accordion title="Rootly AI cites the wrong file owner" icon="user-check">
    Team membership, repository collaborators, or CODEOWNERS may be out of date, or the file may not be covered by a CODEOWNERS pattern. Update the relevant GitHub source; Rootly AI will read the current data on the next investigation.
  </Accordion>

  <Accordion title="Disconnected on the GitHub side" icon="plug-circle-xmark">
    If a GitHub admin uninstalls the Rootly AI GitHub App from the organization, Rootly's card still shows Connected but every query fails. Reconnect from Rootly to reinstall the app.
  </Accordion>
</AccordionGroup>

***

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Can Rootly AI comment on PRs or push code?" icon="lock">
    No. The GitHub connector is read-only. Rootly AI can read GitHub data but never invoke write actions through this connector.
  </Accordion>

  <Accordion title="Does the connector cover GitHub Enterprise Server?" icon="server">
    Coverage depends on how your GitHub Enterprise instance is reachable. Contact support if you're on a self-hosted GitHub Enterprise Server and want to confirm compatibility.
  </Accordion>

  <Accordion title="Does Rootly cache GitHub data?" icon="floppy-disk">
    Rootly doesn't maintain a full replica of GitHub. Queries run at investigation time. Raw GitHub tool results and the response derived from them are replaced with omission markers in durable AI session history, but GitHub evidence can still appear in the completed AI SRE report and in LLM traces used for quality monitoring. See [Data Privacy for Rootly AI](/ai/data-privacy-for-rootly-ai) for the retention boundary.
  </Accordion>
</AccordionGroup>

***

## Related Pages

<CardGroup cols={3}>
  <Card title="Connectors Overview" icon="sparkles" href="/ai/connectors/overview">
    All connectors and how they fit together.
  </Card>

  <Card title="Sentry" icon="bug" href="/ai/connectors/sentry">
    Pair GitHub with Sentry for the strongest "what caused this?" signal.
  </Card>

  <Card title="Data Privacy for Rootly AI" icon="shield" href="/ai/data-privacy-for-rootly-ai">
    What Rootly AI sees, retention, and model training controls.
  </Card>
</CardGroup>


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