GitHub Setup

This guide will help you set up Codity with GitHub to start reviewing pull requests automatically.

Prerequisites

  • A GitHub account with access to the repositories you want to connect
  • Admin access to install GitHub Apps on your organization or personal account
  • Repositories must allow GitHub App access

Setup Steps

Step 1: Install the Codity GitHub App

  1. Navigate to Codity Settings → Providers → GitHub
  2. Click "Connect GitHub" or "Install GitHub App"
  3. You'll be redirected to GitHub to authorize the Codity GitHub App
  4. Select the organization or personal account where you want to install the app
  5. Choose which repositories to grant access to:
    • All repositories: Grants access to all current and future repositories
    • Only select repositories: Choose specific repositories to connect
  6. Click "Install" to complete the installation

Step 2: Grant Required Permissions

The Codity GitHub App requires the following permissions:

  • Contents (Read): To read repository files and analyze code changes
  • Pull Requests (Read & Write): To read PRs and post review comments
  • Metadata (Read): To access repository metadata
  • Webhooks (Write): To register webhooks for PR notifications

These permissions are automatically requested during installation. You can review them in the GitHub App installation screen.

Step 3: Enable Repositories

  1. After installation, return to the Codity dashboard
  2. Navigate to RepositoriesAdd Repository
  3. Select GitHub as your provider
  4. Choose the repositories you want to enable for code reviews
  5. Click "Enable" for each repository

Step 4: Verify Setup

  1. Create a test pull request in one of your connected repositories
  2. Wait 1-3 minutes for Codity to analyze the PR
  3. Check the PR comments to see Codity's review feedback

Best Practices

  1. Install at organization level: Install the GitHub App for the entire organization when possible to avoid managing multiple installations
  2. Grant necessary permissions only: Only grant permissions you need. You can always add more later
  3. Monitor webhook deliveries: Periodically check webhook delivery status in repository settings
  4. Use repository selection carefully: Start with "Only select repositories" and add more as needed
  5. Keep app updated: Ensure you're using the latest version of the Codity GitHub App

Next Steps