Integrating GitHub with Span
Last updated: October 27, 2026
Span's GitHub integration reads pull requests, reviews, commits, and repository activity from github.com through a read-only GitHub App. GitHub Enterprise Server and GitHub Enterprise Cloud with data residency connect through the separate GitHub Enterprise integration.
Why it matters
GitHub is one of Span's foundational data sources. It covers the full life of a change, from first commit through review and merge, so Span can compute pull request, code review, contributor activity, and AI code metrics across your organization. Paired with deployment and incident data, it also feeds DORA metrics.
How it works
Read-only GitHub App: Span installs a GitHub App that uses read-only permissions. It never writes to, changes, or deletes anything in GitHub.
Scheduled sync: Span syncs GitHub about every 2 hours. A new organization backfills 6 months of history by default.
Several GitHub organizations: You can connect more than one GitHub organization to one Span workspace. Each installation is its own connection.
Repository scope: Span only sees the repositories you grant the GitHub App. You choose all or selected repositories during installation and can change the list later in your GitHub organization settings.
Permissions the GitHub App requests (all read-only)
Permission | Purpose |
|---|---|
| Repository contents and PR diffs |
| PR metadata, reviews, and comments |
| Issues, for GitHub Issues and issue links |
| Organization membership and team structure |
| Repository names, branches, and creation dates |
| Organization-level settings |
| Copilot seat assignments (used only when you turn on Copilot) |
| GitHub Projects data |
| Repository-level projects |
| Commit status checks |
| Requested by the app. Span does not build DORA deployments from GitHub deployment events today. Send deployments with the DORA API instead. |
Data Span reads
Pull requests: title, description, status, labels, all timestamps (opened, ready for review, merged, closed), timeline events (review requests, approvals, dismissals), and file-level diffs (additions and deletions).
Code reviews: review state per reviewer (approved, changes requested, commented, dismissed), inline and general PR comments, and review request history.
Commits: messages, authors, timestamps, and which PR each commit belongs to.
Repositories and organization: repository metadata (name, owner, default branch, visibility), teams and team membership, user accounts and organization membership.
GitHub Copilot (optional): Copilot seat assignments and per-user usage data, when you turn on the Copilot toggle for a connection.
Metrics powered by GitHub
Span splits the PR lifecycle into these stages:
Stage | Definition |
|---|---|
Coding | First commit to PR opened |
Awaiting First Review | PR opened to first review |
Reworking | First review to last action (addressing feedback) |
Idling | Last action to merge |
Deploying | Merge to production. Needs deployment data and deploy-to-PR linking, which Span turns on for your organization on request. |
Lead Time for Changes | First commit to production. Same requirements as Deploying. |
Pull request metrics: PRs Merged / Week, Weighted PRs / Week, PR Size, % of PRs Merged Without Review, % of PRs Merged With Tests, PR Revert Rate, PR Review Cycles, PR Link Rate, and Est. Bug PR Density.
Code review metrics: PRs Reviewed / Week, Review Response Time, Comments Authored / Week, and Comments Received / PR.
Commit and activity metrics: Commit Days / Week and Lines of Code.
DORA metrics: Deployment Frequency and Lead Time for Changes need deployments sent through Span's DORA API. Change Failure Rate and Mean Time to Recover need incidents from incident.io, Rootly, or the DORA API.
AI code metrics: AI Code Ratio and related AI Impact metrics come from agent traces, matched against your merged PR diffs. They don't need the Copilot integration.
AI tool usage metrics: AI Days / Week and AI active users come from your AI tool integrations. For Copilot, that is the Copilot toggle on your GitHub connection.
Setup
In Span, go to Settings → Integrations (the page is titled Tools & integrations).
Click Connect on the GitHub card. GitHub opens so you can authorize Span's GitHub App.
Choose All repositories or Only select repositories. Span only reads the repositories you grant.
To add another GitHub organization, open the GitHub integration and click Connect another.
Optional: to sync Copilot usage, grant the app GitHub Copilot Business organization permission (read), then turn on the GitHub Copilot toggle under the connection.
You need the Manage Integrations permission in Span. Owners, Admins, and the Integration Admins group have it by default.
Things to know
Metrics refresh about every 2 hours. They do not update within minutes. For example, a PR merged at 10:05 appears after the next sync, which can be as late as about 12:05. A fix to a username or a newly granted repository also waits for the next sync.
GitHub deployments do not feed DORA. The app requests the
deploymentspermission, but Span does not count GitHub deployment events. Have your CI/CD pipeline call the DORA API. Span has no PagerDuty integration; use incident.io, Rootly, or the DORA API for incidents.AI Code Ratio does not need Copilot. The Copilot toggle adds Copilot seat assignments and per-user usage data only. AI Code Ratio comes from agent traces.
Some metrics differ on GitHub Enterprise. Span identifies reverts only on github.com, so PR Revert Rate reads 0 on GitHub Enterprise (Server or Cloud with data residency). Est. Bug PR Density runs only when every Git host your organization connects is GitHub (github.com) or GitLab, so a GitHub Enterprise connection turns it off for the whole organization. Span turns both metrics on for your organization on request.
Span reads code diffs. It reads PR diffs to compute line counts and to match merged code against agent traces for AI Code Ratio. It does not only read metadata.
You can exclude noise. Settings → Metrics lets you ignore repositories, base or head branches, bot usernames, and generated files.
People are matched by GitHub username. PRs count toward a person once their GitHub username is on their Span profile. Commits match through the commit author email on the GitHub account.
Troubleshooting
A repository is missing: confirm the GitHub App installation includes it (GitHub organization settings → GitHub Apps), then wait for the next sync.
The connection shows Reconnect required: Span could not authenticate twice in a row. Open the GitHub integration and choose Reconnect.
A person's PRs or commits are missing: see Troubleshooting GitHub Data Quality.
Related articles
Ways to connect GitHub to Span
Troubleshooting GitHub Data Quality
GitHub Copilot Integration Guide
How AI Code Ratio is calculated
How to use the DORA API to send deployment activity to Span
Need help?
Contact your Span account team or reach out to support@span.app.