Choose a GitHub Copilot connection
Compare GitHub Copilot connection types and choose the option that matches your GitHub organization, token permissions, and Enterprise environment.
Overview
LinearB supports multiple ways to connect GitHub Copilot. Choose a connection based on your GitHub environment, the scope of data you need, and the authentication method your organization permits.
Choose a Connection Type
Classic Token
Choose Classic token when you can use a classic GitHub Personal Access Token and need to collect Copilot usage across one or more organizations accessible to the token owner.
Best for:
- Standard GitHub organizations
- Collecting data from multiple organizations with one token
- Organizations that permit classic Personal Access Tokens
- Selecting organizations manually, by regular expression, or by including all accessible organizations
Required token scopes:
read:userread:org
Configuration guide:
Fine-Grained Token
Choose Fine-grained token when your organization requires more restrictive token permissions and you need to connect a single GitHub organization.
Best for:
- Organizations that restrict or discourage classic Personal Access Tokens
- Connecting one GitHub organization
- Applying narrowly scoped, read-only permissions
Required organization permissions:
- Organization Copilot metrics: Read-only
- Members: Read-only
The token owner must also have permission to view Copilot metrics for the selected organization.
Configuration guide:
Enterprise
Choose Enterprise when you need to collect GitHub Copilot metrics across a GitHub Enterprise environment.
Best for:
- Enterprise-wide Copilot reporting
- Organizations managed under a GitHub Enterprise account
- Collecting Copilot metrics across multiple enterprise organizations
Configuration guide:
Enterprise on ghe.com
Use the Enterprise connection guidance for
GitHub Enterprise Cloud with data residency when your
enterprise is hosted on a custom *.ghe.com subdomain.
Best for:
- GitHub Enterprise Cloud with data residency
-
Enterprises hosted on a custom
<subdomain>.ghe.comdomain - Metrics requests that must use an enterprise-specific API base URL
Configuration guide:
Quick Recommendation
- Use a classic token when you need access to multiple GitHub organizations and your security policy permits classic Personal Access Tokens.
- Use a fine-grained token when you need narrowly scoped, read-only access to one organization.
- Use Enterprise when you need Copilot reporting across a GitHub Enterprise environment.
- Follow the ghe.com guidance when your GitHub Enterprise Cloud environment uses a custom data-residency subdomain.
Add a GitHub Copilot Integration
- Go to Settings → Company Settings → AI Tools → Integrations.
- Click Add New.
- Select GitHub Copilot and click Continue.
- Select Classic token, Fine-grained token, or Enterprise.
- Click Continue.
- Enter the credentials and configuration required for the selected connection type.
- Click Connect.
LinearB validates the submitted configuration. When validation succeeds, the integration appears in the Connected list.
Manage a GitHub Copilot Integration
The following actions are available:
- Connect — create and activate a new GitHub Copilot integration.
- Edit — update the available settings for a connected integration.
- Disconnect — stop new data collection and move the integration to the Disconnected list.
- Reconnect — validate and reactivate a previously disconnected integration.
Edit a connected integration
- Open Settings → Company Settings → AI Tools → Integrations.
- Select Connected.
- Select the GitHub Copilot integration you want to update.
- Under Main Settings, click Edit.
- Update the available token or organization settings.
- Click Save changes to apply the update or Cancel to discard it.
What happens to historical data?
Editing a GitHub Copilot integration does not delete previously collected metrics.
- LinearB may recollect a recent window of Copilot data after settings are saved.
- Recollected records are updated in place and are not counted twice.
- Data older than the recollection window remains unchanged.
- Previously collected data is also preserved when an integration is disconnected.
Learn more:
What Data Is Available?
GitHub Copilot integrations provide adoption and accepted-lines data in AI Analytics.
Model, token, and estimated-consumption data is not currently available through GitHub Copilot integrations.
Troubleshooting
If LinearB cannot validate a GitHub Copilot integration, verify that:
- GitHub Copilot usage metrics are enabled.
- The token is valid and has the required permissions.
- The token owner can access the selected organization or enterprise.
- The selected connection type matches the token and GitHub environment.
- Another active integration does not already use the same connection type.
If a connected integration displays an error, select it under Connected, click Edit, correct the configuration, and click Save changes.
Learn more:
Related Articles
How did we do?
Choose a Claude Code connection
Connect Amazon Q Developer to LinearB