﻿> ## 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

> Track deployments, create and update issues, fetch commits, and enrich PR links with automatic status tracking for incident management.

Connect GitHub to Rootly to automate issue tracking, surface commit context during incidents, and capture deployment signals as they happen.

**This integration allows you to:**

* Create and update GitHub issues from incident workflows
* Fetch recent commits across repositories during an incident
* Receive push, pull request, and issue events as Rootly pulses
* Automatically enrich GitHub PR links shared in Slack with live status updates

## Before You Begin

<Warning>
  You must be an **Owner** of your GitHub organization and an **Admin** of your Rootly account to complete this installation.

  Rootly recommends using a **service account** so the integration continues to work if a user leaves your organization.
</Warning>

This integration uses a two-step process:

1. Install the **rootlyhq** GitHub App from the GitHub Marketplace
2. Connect GitHub to Rootly via OAuth

## Permissions

The following GitHub App permissions are required:

| Permission    | Access Level |
| ------------- | ------------ |
| Checks        | Read         |
| Code          | Read         |
| Deployments   | Read         |
| Metadata      | Read         |
| Pull Requests | Read         |
| Issues        | Read + Write |

## Installation

### Step 1: Install the GitHub Marketplace App

<Steps>
  <Step title="Open your organization's GitHub Apps page">
    Navigate to the GitHub Apps page for your organization. Replace `<your-organization-name>` with your organization's name:

    ```text theme={null}
    https://github.com/organizations/<your-organization-name>/settings/installations
    ```

    <Frame>
      <img alt="Organization GitHub Apps settings page" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-1.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=b36d46867fcd9ec693b570408368c50f" width="1268" height="806" data-path="images/integrations/github/github/images-1.webp" />
    </Frame>

    Click **GitHub Marketplace**.

    <Frame>
      <img alt="GitHub Marketplace link in organization settings" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-2.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=d790ec1ff5cfd36735160f0a7130cc55" width="971" height="507" data-path="images/integrations/github/github/images-2.webp" />
    </Frame>
  </Step>

  <Step title="Find and add the Rootly app">
    Search for **rootly** and click on the Rootly app.

    <Frame>
      <img alt="Rootly app in GitHub Marketplace search results" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-3.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=b6f63563c4514b0547c932876d9bd126" width="1387" height="488" data-path="images/integrations/github/github/images-3.webp" />
    </Frame>

    Click **Add** to begin the installation.

    <Frame>
      <img alt="Add button on the Rootly Marketplace listing" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-4.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=9c62c6e0d319305360ef2d9168b6a050" width="1327" height="619" data-path="images/integrations/github/github/images-4.webp" />
    </Frame>
  </Step>

  <Step title="Select the correct organization">
    If you belong to multiple GitHub organizations, select the correct one and click **Install it for free**.

    <Frame>
      <img alt="Selecting which organization to install the app for" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-5.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=571bc16cc26843cf72ffac0e0e63346f" width="1134" height="380" data-path="images/integrations/github/github/images-5.webp" />
    </Frame>

    Confirm the correct organization is selected. Check **Allow my billing information to be linked with this organization** and click **Save**.

    <Frame>
      <img alt="Billing information confirmation for the organization" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-6.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=4e5bedce5c5fbf29048efa2138c6ded6" width="1063" height="801" data-path="images/integrations/github/github/images-6.webp" />
    </Frame>

    Click **Complete order and begin installation**.

    <Frame>
      <img alt="Complete order and begin installation button" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-7.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=019e6bc2e658d9eb4c00d34c8008a866" width="1119" height="699" data-path="images/integrations/github/github/images-7.webp" />
    </Frame>
  </Step>

  <Step title="Set repository scope and install">
    Select the desired **scope of access** (all repositories or specific repositories) and click **Install**.

    <Frame>
      <img alt="Repository scope selection for the GitHub App" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-8.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=cedf43ad993137d8ea1750e55bc0d8b5" width="631" height="800" data-path="images/integrations/github/github/images-8.webp" />
    </Frame>
  </Step>

  <Step title="Log out of GitHub">
    Log out of your GitHub account before proceeding. This is required so Rootly can re-establish the connection under the correct account.

    <Frame>
      <img alt="Logging out of GitHub before connecting" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-9.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=195b8dc2c07f8db44c54db20067da375" width="325" height="744" data-path="images/integrations/github/github/images-9.webp" />
    </Frame>
  </Step>
</Steps>

### Step 2: Connect GitHub to Rootly

<Steps>
  <Step title="Find GitHub in Rootly Integrations">
    Navigate to the [Integrations](https://rootly.com/account/integrations) page in Rootly and search for **github**.

    <Frame>
      <img alt="Searching for GitHub on the Rootly integrations page" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-10.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=ffbab81e537037e4fb22a073e13821b8" width="1023" height="502" data-path="images/integrations/github/github/images-10.webp" />
    </Frame>
  </Step>

  <Step title="Authorize the connection">
    You'll be prompted to sign in to GitHub to authorize the connection to your organization.

    <Frame>
      <img alt="GitHub sign-in prompt authorizing the Rootly connection" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-11.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=a5c2365dddb44b4e866dc7fe1d748046" width="445" height="626" data-path="images/integrations/github/github/images-11.webp" />
    </Frame>
  </Step>

  <Step title="Save the integration">
    Click **Save** to complete the setup.

    <Frame>
      <img alt="Saving the GitHub integration in Rootly" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-12.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=0018df07a82ef7f2b40543030d8c7d58" width="920" height="348" data-path="images/integrations/github/github/images-12.webp" />
    </Frame>

    <Check>
      GitHub is now connected. You can use the **Create Issue**, **Update Issue**, and **Get Commits** workflow actions, and GitHub events will begin flowing in as pulses.
    </Check>
  </Step>
</Steps>

## Workflow Actions

These actions are available in **Incident Workflows** and **Alert Workflows**.

### Create a GitHub Issue

Creates a new issue in the specified GitHub repository and links it to the Rootly incident or action item.

| Field                   | Description                                                                     | Required |
| ----------------------- | ------------------------------------------------------------------------------- | -------- |
| **Repository**          | The GitHub repository where the issue will be created (for example, `org/repo`) | Yes      |
| **Title**               | Issue title. Supports Liquid templating (for example, `{{ incident.title }}`)   | Yes      |
| **Body**                | Issue body/description. Supports Liquid templating                              | No       |
| **Labels**              | Comma-separated list of label names to apply to the issue                       | No       |
| **Issue Type**          | The type of issue to create (for example, `Bug`, `Feature`, `Task`)             | No       |
| **Parent Issue Number** | Issue number of the parent issue. Use this to create a sub-issue                | No       |

### Update a GitHub Issue

Updates an existing GitHub issue linked to the incident or action item.

| Field          | Description                                                                                                                                 | Required |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| **Issue ID**   | The ID of the GitHub issue to update. Use the stored ID from a prior Create Issue action                                                    | Yes      |
| **Title**      | New title for the issue. Supports Liquid templating                                                                                         | No       |
| **Body**       | New body/description. Supports Liquid templating                                                                                            | No       |
| **Labels**     | Comma-separated list of label names to apply                                                                                                | No       |
| **Issue Type** | Updated issue type                                                                                                                          | No       |
| **Completion** | Set to **Auto** to mirror the incident or action item status. Closes the issue when the incident resolves or the action item is marked done | No       |

<Info>
  When **Completion** is set to **Auto**, Rootly will automatically close the GitHub issue when the linked incident is resolved or the linked action item is completed.
</Info>

### Get Commits

Fetches recent commits from one or more GitHub repositories and optionally posts them to the incident timeline or a Slack channel.

| Field                             | Description                                                                                                                                                             | Required    |
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| **Services Impacted by Incident** | When enabled (default), automatically queries the GitHub repositories linked to the services impacted by the incident. Disable this to specify repositories manually    | No          |
| **Service IDs**                   | Rootly service IDs whose linked GitHub repositories will be queried. Required when **Services Impacted by Incident** is disabled and **Repository Names** is not set    | Conditional |
| **Repository Names**              | Explicit list of GitHub repository names to query (for example, `org/repo`). Required when **Services Impacted by Incident** is disabled and **Service IDs** is not set | Conditional |
| **Branch**                        | The branch to fetch commits from. Defaults to `master`                                                                                                                  | No          |
| **Past Duration**                 | How far back to look for commits (for example, `1h`, `30m`)                                                                                                             | No          |
| **Post to Incident Timeline**     | When enabled, appends fetched commits as an event in the incident timeline                                                                                              | No          |
| **Post to Slack Channels**        | Slack channel names to post the commit list to                                                                                                                          | No          |

<Info>
  When **Services Impacted by Incident** is disabled, either **Service IDs** or **Repository Names** must be provided. Each service used must have a GitHub repository configured in its settings.
</Info>

## PR Link Enrichment

When an engineer pastes a GitHub PR URL into the incident's Slack channel, Rootly automatically:

1. Detects the PR link and attaches it to the incident
2. Tracks the PR status (open, approved, merged) in real time
3. Posts status updates in Slack as the PR progresses
4. Adds each status change as an event in the incident timeline

<Frame>
  <iframe src="https://www.loom.com/embed/af877e8142784d0d8fc2d946e88a014a" frameborder="0" allowfullscreen width="100%" height="400px" />
</Frame>

## Inbound Events (Pulses)

Rootly receives GitHub webhook events and stores them as **pulses** — timestamped signals you can correlate with incidents.

### Supported Events

| Event                      | Trigger                                     |
| -------------------------- | ------------------------------------------- |
| **Push**                   | Any push to any repository branch           |
| **Pull Request: Opened**   | A new pull request is opened                |
| **Pull Request: Closed**   | A pull request is closed without merging    |
| **Pull Request: Merged**   | A pull request is merged                    |
| **Pull Request: Approved** | A pull request review approval is submitted |
| **Issues**                 | A GitHub issue is opened, closed, or edited |

### Pulse Labels

Each pulse includes the following labels for filtering and routing:

| Label        | Description                                        | Events                |
| ------------ | -------------------------------------------------- | --------------------- |
| `action`     | Event action (for example, `push`, `pr_merged`)    | All                   |
| `repository` | Repository name where the event originated         | All                   |
| `ref`        | Branch or tag ref (for example, `refs/heads/main`) | Push, Pull Request    |
| `base`       | Target branch of the pull request                  | Pull Request (merged) |
| `merged_by`  | GitHub login of the user who merged the PR         | Pull Request (merged) |

## Secret Scanning

GitHub scans public repositories for known secret patterns, including Rootly API tokens.

Rootly has partnered with GitHub's secret scanning program. When a Rootly token is detected in a public repository, GitHub notifies Rootly, which then alerts workspace owners and allows them to revoke the token within seconds.

GitHub Advanced Security customers can additionally enable [push protection](https://github.blog/changelog/2022-04-04-secret-scanning-prevents-secret-leaks-with-protection-on-push/) to block Rootly tokens from entering repositories at push time.

* [Learn more about secret scanning](https://docs.github.com/en/github/administering-a-repository/about-secret-scanning)
* [Partner with GitHub on secret scanning](https://docs.github.com/en/developers/overview/secret-scanning/)

## Troubleshooting

<AccordionGroup>
  <Accordion title="Issues are not being created" icon="circle-exclamation">
    * Confirm the repository name is in `org/repo` format
    * Verify the connected GitHub account has write access to the target repository
    * Check that the **rootlyhq** GitHub App is still installed and has access to the repository
  </Accordion>

  <Accordion title="Get Commits returns no results" icon="code-commit">
    * Confirm the branch name is correct and exists in the repository
    * Check that the **Past Duration** window is wide enough to include recent commits
    * When using Service IDs, verify each service has a GitHub repository configured in its settings
  </Accordion>

  <Accordion title="PR enrichment is not working" icon="code-pull-request">
    * The incident must have an active Slack channel
    * The PR URL must be pasted directly in the incident Slack channel (not a thread)
    * Confirm the GitHub App has **Read** access to pull requests
  </Accordion>

  <Accordion title="Pulses are not appearing" icon="bolt">
    * Navigate to the Rootly integrations page and verify the GitHub connection is active
    * Re-authenticate if the OAuth token has expired
    * Confirm the **rootlyhq** GitHub App is installed and the webhook is active in your GitHub organization settings
  </Accordion>
</AccordionGroup>

## Uninstall

Uninstalling requires two steps — removing the integration from Rootly and uninstalling the GitHub App.

<Steps>
  <Step title="Delete from Rootly">
    Delete the GitHub integration from Rootly via the **Integrations** page.

    <Frame>
      <img alt="Deleting the GitHub integration from Rootly" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-13.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=8f068abd328d19c5caed134732ee6b3d" width="918" height="341" data-path="images/integrations/github/github/images-13.webp" />
    </Frame>
  </Step>

  <Step title="Uninstall from GitHub">
    Uninstall the **rootlyhq** app from your organization's GitHub Apps page.

    <Frame>
      <img alt="Uninstalling the rootlyhq app from the GitHub organization" src="https://mintcdn.com/rootly/7PwamMJIAOaYlZ7c/images/integrations/github/github/images-14.webp?fit=max&auto=format&n=7PwamMJIAOaYlZ7c&q=85&s=4417aeb09e7fb4f6a97e1b028a1797fd" width="1282" height="1254" data-path="images/integrations/github/github/images-14.webp" />
    </Frame>
  </Step>
</Steps>
