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

# GitHub Integration

export const NeedHelpFooter = ({provider, troubleshootingText = "troubleshooting steps"}) => {
  return <p>
      <strong>Need help?</strong> If you encounter any issues setting up the {provider} integration, please contact our support team or visit our documentation for {troubleshootingText}.
    </p>;
};

export const ManagingIntegration = ({provider, settingsPath = "Settings → Integrations", actionText = "Configure or Disconnect"}) => {
  return <>
      <h2>Managing the Integration</h2>
      <p>To disconnect or modify the {provider} integration:</p>
      <ol>
        <li>Go to Codemod <strong>{settingsPath}</strong></li>
        <li>Find your {provider} integration and click <strong>{actionText}</strong></li>
      </ol>
    </>;
};

Connect Codemod to your GitHub repositories to enable automated code transformations across your codebase.

## Why integrate GitHub?

Integrating Codemod with GitHub allows you to apply codemods directly to your repositories and create pull requests with automated code changes.

## Set up the integration

<Steps>
  <Step title="Navigate to add organization">
    Sign in to [Codemod](https://app.codemod.com). Click on team switcher and click on "Add Organization"

    <img src="https://mintcdn.com/codemod/FPj880CXGC9OFtxA/images/integrations/github-step-add-org-dark.png?fit=max&auto=format&n=FPj880CXGC9OFtxA&q=85&s=b149241f490456b0e200361d665d3be4" alt="Screenshot of how you can add organization in Codemod platform" title="Screenshot of how you can add organization in Codemod platform" className="hidden dark:block mx-auto" style={{ width:"58%" }} width="960" height="540" data-path="images/integrations/github-step-add-org-dark.png" />

    <img src="https://mintcdn.com/codemod/FPj880CXGC9OFtxA/images/integrations/github-step-add-org-light.png?fit=max&auto=format&n=FPj880CXGC9OFtxA&q=85&s=7258414f851ff54cdfb5016004a38fa3" alt="Screenshot of how you can add organization in Codemod platform" title="Screenshot of how you can add organization in Codemod platform" className="block dark:hidden mx-auto" style={{ width:"58%" }} width="960" height="540" data-path="images/integrations/github-step-add-org-light.png" />
  </Step>

  <Step title="Connect GitHub">
    Click the **"Connect GitHub"** button to begin the integration process.

    <img src="https://mintcdn.com/codemod/FPj880CXGC9OFtxA/images/integrations/github-step-connect-dark.png?fit=max&auto=format&n=FPj880CXGC9OFtxA&q=85&s=273a1ec01e22ca65618e51fef06a7980" alt="Screenshot of how you connect Github in Codemod platform" title="Screenshot of how you connect Github in Codemod platform" className="hidden dark:block mx-auto" style={{ width:"58%" }} width="1800" height="1528" data-path="images/integrations/github-step-connect-dark.png" />

    <img src="https://mintcdn.com/codemod/FPj880CXGC9OFtxA/images/integrations/github-step-connect-light.png?fit=max&auto=format&n=FPj880CXGC9OFtxA&q=85&s=45e8f430f0fc6d0542c817ee7789e269" alt="Screenshot of how you connect Github in Codemod platform" title="Screenshot of how you connect Github in Codemod platform" className="block dark:hidden mx-auto" style={{ width:"58%" }} width="1800" height="1528" data-path="images/integrations/github-step-connect-light.png" />
  </Step>

  <Step title="Install the GitHub App">
    You'll be redirected to GitHub where you can:

    1. Select the **GitHub account** (personal or organization) where you want to install the Codemod app
    2. Choose which **repositories** to grant access to (all repositories or select specific ones)
    3. Review the permissions requested by the app

    After approving the installation on GitHub, you'll be redirected back to Codemod where you can confirm the integration is active.

    <img src="https://mintcdn.com/codemod/FPj880CXGC9OFtxA/images/integrations/github-step-configure-dark.png?fit=max&auto=format&n=FPj880CXGC9OFtxA&q=85&s=02e2907214aacbc0af9b263372dc112a" alt="Screenshot of how you connect Github in Codemod platform" title="Screenshot of how you connect Github in Codemod platform" className="hidden dark:block mx-auto" style={{ width:"58%" }} width="1200" height="1000" data-path="images/integrations/github-step-configure-dark.png" />

    <img src="https://mintcdn.com/codemod/FPj880CXGC9OFtxA/images/integrations/github-step-configure-light.png?fit=max&auto=format&n=FPj880CXGC9OFtxA&q=85&s=0a72a1dd2fff5720b794250df23f5e61" alt="Screenshot of how you connect Github in Codemod platform" title="Screenshot of how you connect Github in Codemod platform" className="block dark:hidden mx-auto" style={{ width:"58%" }} width="1200" height="1000" data-path="images/integrations/github-step-configure-light.png" />
  </Step>
</Steps>

## Using the GitHub integration

Once connected, you can:

* Select connected repositories when running codemods
* Automatically create pull requests with your code transformations
* Configure which repositories to target for specific codemods

## Managing Permissions

You can modify repository access at any time:

1. Go to your GitHub account settings
2. Navigate to **Applications** → **Installed GitHub Apps**
3. Find **Codemod** and click **Configure**
4. Update repository access as needed

### Required permissions

Codemod requires the following GitHub permissions:

**Read** access to:

* Repository metadata
* Repository code
* Commit statuses

**Read and Write** access to:

* Code (to create branches and commits)
* Pull requests (to create and update PRs)

These permissions allow Codemod to read your code, create branches with transformations, and open pull requests for review.

### Managing team members

Add team members to your organization to collaborate on migrations and control access to Campaigns and Insights.

<Note>
  If your organization uses [SAML SSO](/platform/saml#user-provisioning-and-access-control), users are provisioned automatically on first login (JIT) and access is controlled through your IdP — you do not need to invite them manually. Use the steps below to manage roles for users who already exist, or to invite users when SSO is not in use.
</Note>

<Steps>
  <Step title="Navigate to Organization Settings">
    Go to **Organization Settings** → **Members** in the Codemod app.
  </Step>

  <Step title="Invite team members">
    Click **Invite Members** and enter the email addresses of team members you want to add.
  </Step>

  <Step title="Assign roles">
    Assign one of the following roles to each team member:

    * **Admin**: Full access to organization settings and features
    * **Member**: Can create and manage Campaigns, view Insights
    * **Viewer**: Read-only access to Campaigns and Insights
  </Step>
</Steps>

## Security considerations

* We recommend enabling branch protections on your main branches to ensure changes are reviewed before merging
* Codemod can only access repositories you explicitly grant during the installation process
* You can revoke access at any time through your GitHub settings
* All code transformations are submitted as pull requests for your review

<ManagingIntegration provider="GitHub" />

***

<NeedHelpFooter provider="GitHub" />
