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

# GitHub

> Connect GitHub to Steadwing so every deployment, commit, and release is automatically correlated with production incidents during root cause analysis.

## What does the GitHub integration do?

The GitHub integration automatically correlates production incidents with recent code changes -- deployments, commits, pull requests, and releases -- so Steadwing can pinpoint which change likely caused the problem. Steadwing reads your repository data during root cause analysis to identify the responsible commit or deployment and propose code-level fixes.

## Why Use GitHub with Steadwing?

<CardGroup cols={2}>
  <Card title="Deployment Tracking" icon="rocket">
    Correlate incidents with recent deployments and releases
  </Card>

  <Card title="Code Change Analysis" icon="git-branch">
    Identify which commits may have caused production issues
  </Card>

  <Card title="Codebase Insights" icon="code">
    Enable Steadwing to analyze your code for better solution proposals
  </Card>

  <Card title="Timeline Correlation" icon="clock">
    Link incidents to specific PRs, commits, and deployment times
  </Card>
</CardGroup>

## Benefits

* **Faster Root Cause Identification** - Quickly pinpoint which code change triggered an incident
* **Automated Code Analysis** - Steadwing reviews relevant code sections during RCA
* **Deployment Context** - Understand what was deployed when an incident occurred
* **Better Solution Proposals** - Get context-aware fixes based on your actual codebase
* **Historical Insights** - Track patterns between code changes and incidents over time

## How do I connect GitHub to Steadwing?

### Step 1: Connect GitHub OAuth

1. Navigate to [Steadwing Settings](https://app.steadwing.com/settings)
2. Find the **GitHub** integration card
3. Click the **Connect** button
4. You will be redirected to GitHub's authorization page
5. Click **Authorize Steadwing** to complete OAuth

### Step 2: Install Steadwing GitHub App

After completing OAuth, you must install the Steadwing GitHub App on your repositories:

1. Follow the installation link provided in the settings page (Step 2)
2. Choose where to install the app:
   * **All repositories** - Install on all current and future repos
   * **Select repositories** - Choose specific repositories
3. Click **Install** to complete the setup
4. The Steadwing app will now have access to track changes in your selected repositories

## What data does Steadwing pull from GitHub?

### Automatic Event Tracking

Steadwing automatically monitors and tracks:

* **Commits** - Every commit pushed to your repositories
* **Pull Requests** - PR merges and their associated changes
* **Releases** - Tagged releases and their deployment times
* **Deployments** - Deployment events via GitHub Actions or other CI/CD tools

### Code Analysis

Steadwing can:

* Review relevant files and functions
* Identify potentially problematic changes
* Suggest code-level fixes
* Link incidents to specific lines of code

## What permissions does the GitHub integration need?

### Required Permissions

The GitHub integration requires:

* **repo** - Full access to private and public repositories
  * Read repository contents
  * Read commit history
  * Read pull request data
  * Write access for branch creation and pull request creation
* **read:org** - Organization membership information
  * Read organization and team membership

<Note>
  Steadwing never pushes directly to default or protected branches. All code changes are proposed via pull requests on new branches, only after user's approval.
</Note>

### Repository Access

You can control which repositories Steadwing can access:

1. Go to GitHub Settings → Integrations → Applications
2. Find **Steadwing** in the list
3. Click **Configure**
4. Modify repository access settings
5. Save changes

## FAQs

<AccordionGroup>
  <Accordion title="Why do I need to complete Step 2 separately?">
    OAuth (Step 1) authorizes Steadwing to access GitHub, but installing the GitHub App (Step 2) grants repository-level access and enables webhook events for real-time tracking.
  </Accordion>

  <Accordion title="Can I limit Steadwing's access to specific repositories?">
    Yes, during Step 2 you can select specific repositories instead of granting access to all repositories. You can modify this later in GitHub settings.
  </Accordion>

  <Accordion title="Does Steadwing modify my code or create commits?">
    Steadwing can create branches and open pull requests for proposed code fixes, but only when triggered by user action. Steadwing never pushes directly to default or protected branches — all changes are proposed via PRs for your review.
  </Accordion>

  <Accordion title="What happens if I add new repositories later?">
    If you selected "All repositories" during installation, new repositories will automatically be tracked. Otherwise, you need to manually grant access to new repositories in GitHub settings.
  </Accordion>

  <Accordion title="Does Steadwing work with private repositories?">
    Yes, Steadwing works with both public and private repositories. The `repo` permission grants access to private repositories.
  </Accordion>
</AccordionGroup>

Need additional help? Please reach out to us at [hello@steadwing.com](mailto:hello@steadwing.com)
