Overview
The GitHub Copilot integration gives teams visibility into how AI is being used in day-to-day engineering work, without inspecting or storing any source code.
Pensero imports Copilot usage data from GitHub and aligns it with delivery activity to help teams understand adoption patterns, trends over time, and how AI fits into their workflows.
This signal is designed to support better conversations and decisions, not to audit individual contributions.
Pensero reads usage metadata only. It does not access or analyze your code.
What Pensero Reads from Copilot
Pensero ingests Copilot-generated analytics only.
Specifically, Pensero retrieves:
Estimated AI-assisted lines
Total lines added
User identifiers
Timestamps for AI usage events
No source code, prompts, or generated content are accessed or stored.
Pensero aligns this data with Git contribution activity to provide consistent and contextual insights.
How Pensero Calculates AI Usage (%)
Pensero measures AI adoption using a directional proxy, not an exact attribution of code authorship.
AI % = Accepted AI-suggested lines ÷ Total committed lines
Important clarifications:
Accepted AI-suggested lines are used as a proxy because it’s not possible to know which suggestions ultimately ship in a PR.
This metric is designed to track adoption trends and relative usage, not to evaluate individuals or review code quality.
AI usage is best interpreted alongside delivery and quality signals.
How to Set Up the GitHub Copilot Integration (Step-by-Step)
Prerequisites
You’ll need:
Pensero Admin access
A GitHub organization with Copilot licenses
Owner permissions in the GitHub organization
Step 1 – Go to Copilot Integration
Step 2 – Authenticate via GitHub OAuth
You can connect in two ways: click Add instance or click Connect via OAuth.
When the GitHub authorization screen appears, you will see a list of your GitHub organizations. Review each one carefully.
Click Grant for organizations where you are an Owner. This gives Pensero access to read Copilot metrics for that org.
Click Request for organizations where you are not the Owner. This sends an approval request to that org's Owner.
Once you have reviewed all organizations, click Authorize Pensero to complete the connection.
Important: GitHub Copilot requires a separate OAuth flow. It must be connected explicitly, even if GitHub is already integrated. This flow may require higher permissions than the repository OAuth completed during onboarding.
How to check if you have the right permissions
How to check if you have the right permissions
If you can access your organization’s or enterprise’s Copilot usage metrics in GitHub, you likely have the required level of access. If not, ask your GitHub Organization Owner, Enterprise Owner, Billing Manager, or an admin with the relevant Copilot metrics permission to complete the connection.
Step 3 – Confirm the Sync
Once authenticated, the integration shows Connection Active.
Pensero will begin syncing Copilot usage data automatically. Initial insights may take a few hours to appear.
Troubleshooting: Copilot Connection Error
If your GitHub Copilot integration is connected but data is not syncing correctly, you can review the integration health directly from Pensero.
Go to: Integrations → GitHub Copilot Settings
On this page, click Check connection.
This health check helps you understand whether there is a problem with the integration setup, such as:
Copilot policies not enabled
missing access to Copilot metrics endpoints
authentication issues with the connected GitHub account
Important permission requirement
In practice, this connection should be completed by a user with the highest GitHub organization authority available, because regular admin access is often not enough for Copilot endpoints. For Pensero, the safest recommendation is:
Use a GitHub Organization Owner for organization-level Copilot access.
If your company manages Copilot centrally, ask the Enterprise Owner to complete the connection.
Error: Copilot seats (404 billing/seats)
A 404 on the billing/seats endpoint usually means one of the following:
GitHub Copilot Business or Copilot Enterprise is not enabled for that organization.
The connection was completed by a user without Owner permissions. Only organization owners can view assigned Copilot seats.
Error - Usage Metrics API
If you encounter a 422 Copilot Metrics API access disabled error when connecting GitHub Copilot to Pensero, it is almost always due to missing permissions.
Example error: “Your organization has disabled Copilot Metrics API access. Enable it in GitHub settings to access this endpoint.”
This means that Copilot usage metrics are disabled at the organization level or that the required permissions are missing.
How to fix it
Confirm you have the right role
You must be an Owner in the GitHub organization.
Admin or Member roles are not enough to view Copilot usage metrics.
Grant access during OAuth sign-in
Start the OAuth authentication flow.
When GitHub asks you to approve access:
Select your organization.
Make sure you explicitly GRANT permissions
Enable Copilot Usage Metrics
Go to GitHub.
Look near your profile picture to confirm you are in organization settings, not personal settings.
If you are in personal settings:
Click the Switch settings context button.
Choose your organization.
For more details, see https://docs.github.com/rest/copilot/copilot-metrics#get-copilot-metrics-for-an-organization


