# GitHub

Bring your GitHub developer tool spend into Pump View alongside your cloud costs. Pump pulls Copilot seat costs, GitHub Actions minutes, Packages storage, and Codespaces usage so you can see everything in one place.

**Setup time:** \~3 minutes

**Access level:** Read-only

***

### Prerequisites

* **A fine-grained Personal Access Token (PAT).** This token starts with `github_pat_...`. Classic tokens are not supported for this integration.
* **Your GitHub Organization set as the resource owner** on the token. This scopes the token to your org's billing data, not your personal account.
* **Administration and GitHub Copilot Business permissions**, both set to **Read-only** on the token.
* **Your GitHub Organization name.** This is the slug that appears in your GitHub URL (e.g., `github.com/pump-corp` → `pump-corp`).

***

### Setup Instructions

#### 1. Create a Fine-Grained Personal Access Token

1. In GitHub, go to **Settings → Developer settings → Personal access tokens → Fine-grained tokens**.
2. Click **Generate new token**.
3. Under **Resource owner**, select your **Organization** (not your personal account).

> **Note:** If your organization doesn't appear in the dropdown, an org owner may need to enable fine-grained PAT access for the org. Go to **Organization Settings → Personal access tokens → Settings** and allow fine-grained tokens.

#### 2. Set Permissions

Under **Organization permissions**, enable the following (both set to **Read-only**):

* **Administration**
* **GitHub Copilot Business**

You do not need to enable any repository permissions.

#### 3. Generate and Copy the Token

Click **Generate token** and copy it immediately. **It is only displayed once.** The token will start with `github_pat_...`.

#### 4. Connect in Pump

1. In Pump, go to **Settings → Integrations**.
2. Find **GitHub** and click **Connect**.
3. Paste your Personal Access Token.
4. Enter your **Organization name** (the slug, e.g., `pump-corp`).
5. Click **Connect**.

#### 5. Verify

Pump validates your token and backfills up to **365 days** of historical data. Your GitHub spend should appear alongside your cloud costs within a few minutes.

***

### What Data Does Pump Pull?

| Data                  | Description                                                      |
| --------------------- | ---------------------------------------------------------------- |
| **Copilot seats**     | Number of Copilot Business/Enterprise seats and associated costs |
| **GitHub Actions**    | Compute minutes and spend across workflows                       |
| **Packages**          | Storage and data transfer costs for GitHub Packages              |
| **Codespaces**        | Per-user compute and storage costs for GitHub Codespaces         |
| **LFS**               | Git Large File Storage bandwidth and storage costs               |
| **Shared Storage**    | Shared storage costs across Actions and Packages                 |
| **Advanced Security** | GitHub Advanced Security seat costs                              |
| **Marketplace**       | GitHub Marketplace app subscription costs                        |
| **Sponsors**          | GitHub Sponsors contribution costs                               |

### Frequently Asked Questions

#### My organization doesn't appear in the "Resource owner" dropdown.

Your org may not have fine-grained PATs enabled. An org owner needs to go to **Organization Settings → Personal access tokens → Settings** and allow fine-grained tokens. Some orgs also require admin approval for new tokens, so check if your token is pending approval.

#### Can I use a classic Personal Access Token?

No. Classic tokens don't support the granular organization-level permissions Pump needs. You must use a fine-grained token.

#### I set the permissions but Pump says the token is invalid.

Double-check that:

* The **Resource owner** is set to your Organization, not your personal account.
* Both **Administration** and **GitHub Copilot Business** are set to **Read-only** under Organization permissions.
* The token hasn't expired. Fine-grained tokens have a configurable expiration date.

#### How far back does Pump pull data?

Pump backfills up to 365 days of historical data from the date you connect.

#### What happens when my token expires?

Pump will stop syncing new data. You'll need to generate a new fine-grained PAT with the same permissions and reconnect in Pump under **Settings → Integrations**.

#### Can I revoke the token later?

Yes. You can delete the token from GitHub at **Settings → Developer settings → Personal access tokens → Fine-grained tokens** at any time. This will disconnect the integration in Pump.

#### My data isn't showing up after connecting.

* Confirm the token starts with `github_pat_...`.
* Verify the Organization name matches exactly (case-sensitive slug).
* Ensure both required permissions are set to Read-only.
* Wait a few minutes for the initial backfill.
* If the issue persists, reach out to <support@pump.co>.
