Clearly AIDocs

GitHub

Connect Clearly AI to GitHub.

Overview

Connect GitHub to Clearly AI so Clearly AI can use your repositories as project context and review the code in those repositories.

The GitHub integration supports two authentication methods:

  • Personal Token
  • OAuth 2.0

For help choosing between them, see Integrations.

Instructions

Prerequisites

  • A Clearly AI account with access to the Integrations page
  • A GitHub account that can access the repositories you want Clearly AI to review
  • For Personal Token, a GitHub personal access token with access to the repositories Clearly AI should read
  • For OAuth 2.0 with an organization-wide connection, permission to create shared connections in Clearly AI and any GitHub organization approval your company requires

Open the GitHub integration

In Clearly AI, go to Integrations and select GitHub from the list of enabled integrations. The GitHub configuration panel opens.

Choose an authentication method

Select either Personal Token or OAuth 2.0 under GitHub Authentication.

Option A. Personal Token

Use this option when you want to paste a GitHub token directly into Clearly AI.

  1. Select Personal Token.
  2. In Personal Key, paste your GitHub personal access token.
  3. Click Apply & Test to save the configuration and verify the connection.

GitHub integration configured for Personal Token authentication

Option B. OAuth 2.0

Use this option when you want GitHub to handle authentication and authorization.

  1. Select OAuth 2.0.
  2. On the Integrations page, choose Personal (User) or Shared (Workspace) for who can use this connection:
    • Personal (User) means only you can use it.
    • Shared (Workspace) means anyone in your Clearly AI organization can use it. Use a dedicated GitHub bot or service account when you sign in below, so the connection doesn't depend on one employee's personal GitHub account.
  3. Click Connect with GitHub.
  4. Sign in to GitHub if prompted, then approve Clearly AI's access request.
  5. Install or configure the Clearly AI GitHub App on the organization or personal account that owns the repositories you want Clearly AI to read, and grant it access to those repositories.
  6. Return to Clearly AI and click Apply & Test.

GitHub integration configured for OAuth 2.0 authentication

Use the connection in Clearly AI

After the test succeeds, the GitHub connection is available for Clearly AI projects that need repository context. The repositories and code Clearly AI can review depend on the access granted by your token or GitHub authorization.

Which method should you use?

MethodBest whenNotes
Personal TokenYou want the quickest setup and prefer to manage the token yourselfAccess is limited to the repositories and permissions granted to that token
OAuth 2.0You want GitHub to handle authentication, or need a shared connectionSupports Personal (User) and Shared (Workspace) scope in Clearly AI

GitHub App and GitHub user permissions

OAuth 2.0 combines two separate pieces of GitHub access. Both are required, and each does a different job:

PieceGrantsConfigured by
Clearly AI GitHub App installWhich organizations, accounts, and repositories Clearly AI can read (for example, repository contents)The personal account owner, or a GitHub organization owner for org-owned repositories, from the Clearly AI GitHub App install page
GitHub user who clicks Connect with GitHubWhich of those App installations Clearly AI can see and useThe person who signs in through OAuth in Clearly AI

Neither piece alone is enough:

  • The App install without a connected GitHub user leaves Clearly AI with no signed-in identity to look up the installation.
  • A connected GitHub user without the App install leaves Clearly AI with no repository permissions. GitHub App permissions come from the App's install configuration, not from OAuth consent scopes, so signing in doesn't grant repository access by itself.

For a Shared (Workspace) connection, use a dedicated GitHub bot or service account to sign in, instead of a personal account. This keeps the connection working if the employee who set it up changes teams or leaves.

FAQs

  • Integrations - Understand when to use Personal Token versus OAuth 2.0
  • Concepts - Learn how integrations provide project context in Clearly AI