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

# GitHub Integration

> Connect your GitHub repositories to Corelayer for code context, intelligent debugging, and optional pull request creation.

## Prerequisites

* A GitHub account with repositories you want to connect
* Admin or Owner permissions for the GitHub organization or repositories

## Step-by-Step Setup

### 1. Navigate to Integrations

In your Corelayer dashboard, go to the **Integrations** page.

### 2. Add GitHub Integration

Click the **Add Integration** button and select **GitHub** from the list of available integrations.

### 3. Configure Preferences

Before connecting, choose your preferences:

* **Code Indexing** — Allow Corelayer to index your repositories for richer code context during debugging
* **PR Creation** — Allow Corelayer to create pull requests with suggested fixes

### 4. Install the GitHub App

Click **Connect to GitHub**. You'll be redirected to GitHub to install the Corelayer GitHub App:

1. Select the organization or account to install on
2. Choose which repositories to grant access to (all or select specific ones)
3. Click **Install & Authorize**

### 5. Verify Connection

Once redirected back to Corelayer, your GitHub integration should appear as **Connected** in the integrations dashboard. Your selected repositories will be listed.

### 6. Add Repositories to Your Service Maps

When configuring your Corelayer Service Maps, select which GitHub repositories are relevant to each service.

## What Corelayer Can Do With GitHub

Once connected, Corelayer will:

* Pull code context from your repositories when debugging issues
* Index repository code for faster and more accurate root-cause analysis
* Optionally create pull requests with suggested code fixes
* Correlate code changes with errors from other integrations

## Managing Your Integration

### Disconnecting

To disconnect your GitHub integration:

1. Navigate to Settings > Integrations
2. Find your GitHub integration and click **Uninstall**
3. Confirm the uninstallation
4. Optionally, uninstall the Corelayer GitHub App from your GitHub organization settings

## Troubleshooting

### Integration Not Working?

* Verify the GitHub App is installed on the correct organization
* Ensure the app has access to the repositories you want to monitor
* Check that your GitHub account has sufficient permissions
* Try reinstalling the GitHub App if repositories are not appearing

Need help? [Contact support](mailto:support@corelayer.com) for assistance with your GitHub integration.
