GitHub
Connect github.com with a read-only fine-grained personal access token and read repositories, commits, pull requests, issues, releases and Actions runs.
A GitHub connection reads github.com repositories with a fine-grained
personal access token that has read-only permissions. It calls only
api.github.com. For the tables, columns and limits that every forge shares,
see the Git overview.
Preview
Git connections are in Preview and are enabled on request: contact
support@xentropy.ai. Until GitHub is enabled for your account it is not
offered in the forge selector, and its reads fail with PROVIDER_DISABLED.
Create a read-only token
Use a fine-grained personal access token (it starts with github_pat_).
It can be limited to the repositories you choose and to read-only access.
If the organization requires approval for fine-grained tokens, the token can read its private repositories only after an organization owner approves it.
Token permissions
The form lists these permissions with a copy button.
| Permission | Unlocks |
|---|---|
Metadata: Read-only | Repositories, branches, tags, contributors. GitHub always adds it |
Contents: Read-only | Commits and releases |
Pull requests: Read-only | Pull requests |
Issues: Read-only | Issues |
Actions: Read-only | Workflow runs (pipeline_runs) |
You can leave out a permission for a resource you will not read. Reading that
resource then fails at the permissions stage and names the missing
permission.
Set up the connection
Connect with GitHub (sign-in through a GitHub App, with per-repository consent) appears only when GitHub sign-in is available for your account. Until then, connect with a token as above.
Resources
| Resource | Available | Notes |
|---|---|---|
repositories | Yes | Repositories the token can read |
commits | Yes | The default branch, or the branch you choose, in the date range |
pull_requests | Yes | All states; merged comes from the merge time |
issues | Yes | Pull requests are left out |
releases | Yes | GitHub lists draft releases only to tokens that can push, so a read-only token does not see drafts |
tags | Yes | |
branches | Yes | |
contributors | Yes | All-time commit counts from GitHub; anonymous contributors are left out |
pipeline_runs | Yes | GitHub Actions workflow runs |
Columns left empty
GitHub's list endpoints do not return these columns, so they are always empty. Xentropy does not make one extra request per row to fill them.
| Resource | Empty columns |
|---|---|
commits | additions, deletions |
pull_requests | additions, deletions, changed_files, comments |
tags | tagged_at |
contributors | name, email |
Limits
A fine-grained token has 5,000 requests per hour, shared by every tool that
uses the same GitHub account. GitHub also has a secondary rate limit on bursts
of requests. Xentropy reads the x-ratelimit-* headers and waits for the
reset when the budget runs out. See
Limits and refresh for pages, rows and
deadlines.
Errors
| Response | Code | Cause | What to do |
|---|---|---|---|
| 401 | PROVIDER_ACCESS_DENIED, stage auth | The token expired, was revoked, or was mistyped | Generate a new token and choose Replace configuration |
| 403 | PROVIDER_ACCESS_DENIED, stage permissions | A permission is missing. details.missingScopes names it, for example Pull requests: Read-only | Edit the token on GitHub, set the permission to Read-only, then test again |
| 404 | NOT_FOUND | The repository does not exist, or the token cannot see it. GitHub answers 404, not 403, for a private repository outside the token's access | Add the repository to the token's Repository access, or ask an organization owner to approve the token |
| Redirect | NOT_FOUND | The repository moved or was renamed | Select the repository under its new name |
| 403 or 429 with rate limit headers | RATE_LIMITED | The hourly or secondary rate limit is used up | Retry after details.retryAt; scheduled refreshes wait by themselves |
An empty repository reads as no rows, not as an error.
Git overview
Chart repositories, commits, pull requests, issues, releases, tags, branches, contributors and pipeline runs from GitHub, GitLab, Gitea, Bitbucket and Azure DevOps, read-only, in one set of columns.
GitLab
Connect gitlab.com with a read_api access token and read projects, commits, merge requests, issues, releases and pipelines.