Stack SpendDocs

GitHub

Connect your GitHub organization to track Actions, Packages, Copilot, Codespaces, and storage costs.

What StackSpend tracks

Once connected, StackSpend imports the following cost categories from GitHub's billing API:

  • Actions compute minutes
  • Packages data transfer
  • Copilot costs
  • Codespaces compute
  • Storage costs

For GitHub Copilot, StackSpend also imports usage metrics into the AI Explorer: per-member token usage (input and output) for Copilot CLI and the Copilot app, and which models each member uses in the IDE. GitHub does not report token counts per model, or tokens for IDE completions and chat, so model usage appears as interaction counts rather than tokens. This needs two extra settings — see Copilot usage in the AI Explorer below.

Data updates daily.

Prerequisites

  • A GitHub organization account — personal accounts are not supported by the billing API
  • Organization owner or admin access

Setup

Two ways to connect.If the StackSpend GitHub App is offered on the Add provider screen, installing it is the quickest route — one click, no token to create or rotate. The steps below cover the Classic personal access token alternative, which is also what you need for enterprise-level billing, since GitHub Apps cannot read it.
1

Create a Personal Access Token

Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic).

Use a Classic PAT, not a fine-grained token.Fine-grained tokens do not support the org billing API. You must use a Classic PAT.

Grant the following scopes:

  • admin:org
  • manage_billing:enterprise — required if using GitHub Enterprise
  • manage_billing:copilot
2

Add to StackSpend

Go to Providers → Add provider → GitHub. Enter your organization name and the Classic PAT you just created. Click Save.

3

Verify

The first sync runs automatically after saving and backfills roughly the last 90 days, so you get history straight away rather than starting from zero. After that, data updates daily in line with GitHub's billing API.

Organization accounts only.Only organization accounts are supported. GitHub's billing API does not expose personal account billing data. You must be an organization owner or admin.
Note.Free tier usage is automatically excluded from reported costs. Only paid usage appears in StackSpend.

Copilot usage in the AI Explorer

Copilot spend syncs as soon as you connect — nothing extra to do. To also see who is using Copilot and how much in the AI Explorer, two settings are needed:

  1. Turn on Copilot usage metrics. In GitHub, go to your organization's Settings → Copilot → Policies and enable Copilot usage metrics. GitHub only generates the per-member reports once this is on.
  2. Allow read access to those metrics. On a Classic PAT connection, the admin:org scope from the setup steps already includes this (it covers read:org). If you connected with the StackSpend GitHub App, the App needs the "Organization Copilot metrics: Read" permission — GitHub emails an organization owner to approve it, and member-level usage appears on the next sync after they do.
Your Copilot costs are tracked either way.If neither is in place, StackSpend still reports Copilot spend from the billing API. Only the per-member usage breakdown is missing.

Two limits worth knowing, both set by GitHub rather than StackSpend: token counts are reported for Copilot CLI and the Copilot app but not yet for IDE completions or chat, and in some enterprise-owned organizations GitHub withholds per-member data from organization admins entirely.

Data availability

PropertyValue
LatencyDaily
Historical data~90 days backfilled on first sync
Setup time~3 minutes

Frequently asked questions

What credentials do I need to connect GitHub?

You need a GitHub Classic personal access token (PAT) with the admin:org and manage_billing:copilot scopes, created by an organization owner or admin. Fine-grained tokens do not support the org billing API, so you must use a Classic PAT.

Can I connect a personal GitHub account?

No. Only organization accounts are supported because GitHub's billing API does not expose personal account billing data. You must be an organization owner or admin to connect.

What GitHub costs does StackSpend track?

StackSpend imports Actions compute minutes, Packages data transfer, Copilot costs, Codespaces compute, and storage costs from GitHub's billing API, plus per-member Copilot token usage and model mix from GitHub's Copilot usage metrics for the AI Explorer. On the GitHub Business plan it also reads source control activity — deploys and pull requests — so a cost anomaly can be traced back to the PR or deploy behind it.

Is there historical backfill?

Yes. The first sync backfills roughly the last 90 days, then data updates daily in line with GitHub's billing API. Free tier usage is automatically excluded, so only paid usage appears in StackSpend. Copilot per-member usage backfills over the same window once Copilot usage metrics are enabled.

StackSpend Docs