Table of Contents
Integration Guide – GitHub Cloud
Connect your GitHub Cloud organization to LinearB to sync repositories, pull requests, and Git activity.
Connect your GitHub Cloud organization to LinearB to sync repositories, pull requests, and Git activity for delivery metrics, AI insights, and workflow automation.
The GitHub App is the recommended way to connect GitHub Cloud to LinearB. A Personal Access Token (PAT) may be required if you do not have the permissions needed to install the GitHub App in your GitHub organization.
LinearB supports private, public, and internal GitHub repositories. You can choose which repositories to sync during setup.
Summary
What this guide covers
- Connecting GitHub using the GitHub App (recommended)
- Understanding why LinearB requests GitHub permissions
- Connecting GitHub using a Personal Access Token (PAT)
- Required permissions for Classic and Fine-grained PATs
- Webhook alternatives when permissions are restricted
- Reauthorizing an expired GitHub token
Before you begin
- LinearB Admin role
- GitHub organization access
- Organization owner or administrator permissions (required to install the GitHub App or create a PAT)
Why does LinearB use a GitHub App?
The LinearB GitHub App is the recommended way to connect GitHub Cloud to LinearB. It is installed in your GitHub organization and is granted access only to the repositories and permissions required to collect repository activity.
LinearB uses these permissions to read repository metadata, commits, branches, pull requests, reviews, and webhook events. This information powers delivery metrics, AI insights, workflow automations, and notifications such as WorkerB.
|
Permission |
Why LinearB requires it |
|
Repository metadata |
Discover repositories and identify the repositories you choose to connect. |
|
Pull requests |
Sync pull requests, reviews, approvals, and review activity for engineering metrics. |
|
Repository contents |
Read commits, branches, and repository information required for delivery analytics. |
|
Organization members |
Associate GitHub users with LinearB users, teams, and contributor metrics. |
|
Webhooks |
Receive repository events in near real time so dashboards, metrics, and automations remain up to date. |
LinearB requests only the permissions required to read repository activity and receive webhook events. It does not modify your source code or create commits in your repositories.
Method 1: Connect GitHub using the GitHub App (recommended)
The GitHub App is the recommended way to connect GitHub Cloud to LinearB. In LinearB, this connection is initiated by clicking Authorize GitHub, which starts the GitHub App installation flow.
- In LinearB, go to Settings → Company Settings and select the Git tab.
- Click Add Integration.
- Select GitHub.
- Click Authorize GitHub.
- If you have the required permissions, install the GitHub App in your GitHub organization. Otherwise, request approval from a GitHub organization administrator.
- Select the repositories you want LinearB to access.
- Complete the installation and return to LinearB.
Once connected, LinearB begins syncing repository data and enables engineering metrics, AI insights, workflow automations, and WorkerB notifications.
Method 2: Connect GitHub using a Personal Access Token (PAT)
If you cannot install the GitHub App, you can connect GitHub using a Personal Access Token (PAT).
Step 1. Create a Personal Access Token in GitHub
- Log in to GitHub.
- Create either a Fine-grained PAT or a Classic PAT.
- Set an expiration date. To avoid data gaps, we recommend choosing a long expiration period or no expiration (if supported).
Required permissions
|
Classic PAT |
Fine-grained PAT |
|
|
If write:repo-hook cannot be granted, see Alternative to write:repo-hook permission below.
- Copy the token. You will not be able to view it again.
Step 2. Add the GitHub PAT to LinearB
- In LinearB, go to Settings → Company Settings → Git.
- Click Add Integration and select GitHub.
- Select Classic or Fine-grained token.
- Paste the PAT and click Connect.
Alternative to write:repo-hook permission
LinearB uses repository webhooks for real-time data collection. If write:repo-hook cannot be granted, choose one of the following options:
Option 1: Delayed sync
LinearB syncs data every 2 hours instead of in real time. Metrics and notifications may be delayed.
Option 2: Organization-level webhook
Install a GitHub organization-level webhook to bypass repository-level permissions. See Installing a GitHub Organization-Level Webhook .
Reauthorizing an expired GitHub PAT
- Create a new PAT in GitHub.
- In LinearB, go to Settings → Company Settings → Git.
- Open the three-dot menu next to the GitHub integration.
- Select Reauthorize Git and paste the new token.
LinearB resumes syncing data using the new token.
Troubleshooting & support
- Verify that the GitHub account has access to the selected repositories.
- Ensure the required GitHub App permissions or PAT scopes have been granted.
- If a GitHub App installation requires approval, contact your GitHub organization administrator.
- Contact support@linearb.io or join the Dev Interrupted Discord .
How did we do?
Integration Guide - GitLab (Cloud + Self-Managed)
Integration Guide – GitHub Enterprise Server (On-Prem)