> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summation.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

> Connect Summation to GitHub repositories and issues.

The GitHub connector lets Summation read repository metadata, issues, and pull requests. It authenticates with a GitHub **Personal Access Token (PAT)**.

## Form fields

| Field                     | Required | Stored as | Notes                                                                                                                                                                                                                                   |
| ------------------------- | -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Personal Access Token** | Yes      | Secret    | A GitHub PAT — `ghp_...` (classic) or `github_pat_...` (fine-grained). See [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens). |

## Creating a token

Either token type works. The full create-token flow is documented in [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).

* **Fine-grained PAT (recommended).** [Creating a fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token). Grant **Read-only** access to the repositories you want exposed, with the *Contents*, *Issues*, *Pull requests*, and *Metadata* permissions.
* **Classic PAT.** [Creating a personal access token (classic)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic). Grant the `repo` scope (or `public_repo` for public repos only).

<Warning>
  A token's access is exactly what you grant it. Don't issue a PAT with broader scope than Summation needs — fine-grained PATs make this much easier to scope tightly. See [Best practices for personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#best-practices-for-personal-access-tokens).
</Warning>

## Adding datasets

After saving, pick the repositories you want to expose. Source references use the form:

```
github:github.com/owner/repo
```

Each repository becomes a dataset; tables for issues, pull requests, and metadata are derived automatically.

## Common problems

| Error or symptom                                | Likely cause                                                                                                                                                                                                                                        |
| ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `401 Bad credentials`                           | Token is wrong, revoked, or doesn't have access to the repo.                                                                                                                                                                                        |
| `404 Not Found` on a repo you can see in GitHub | Fine-grained PATs only see repos that were explicitly selected when the token was created. Re-issue with the right repos in scope.                                                                                                                  |
| Rate limit warnings                             | Classic PATs share a 5,000 req/hr per-user limit. See [Rate limits for the REST API](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api). Prefer one fine-grained PAT per connection if many users will use Summation. |
