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

# Github (Personal Access Token)

## Overview

> [card] [Pre-built tooling](#pre-built-tooling)

> [card] [Pre-built integrations](#pre-built-integrations)

> [card] [Access requirements](#access-requirements)

> [card] [Setup guide](#setup-guide)

> [card] [Useful links](#useful-links)

> [card] [API gotchas](#api-gotchas)

## Pre-built tooling

> [accordion] ✅ Authorization
>
> | Tools | Status |
> | - | - |
> | Pre-built authorization (API Key) | ✅ |
> | Pre-built authorization UI | ✅ |
> | Custom authorization UI | ✅ |
> | End-user authorization guide | ✅ |
> | Expired credentials detection | ✅ |

> [accordion] ✅ Read & write data
>
> | Tools | Status |
> | - | - |
> | Pre-built integrations | ✅ |
> | API unification | ✅ |
> | 2-way sync | ✅ |
> | Webhooks from Nango on data modifications | ✅ |
> | Real-time webhooks from 3rd-party API | 🚫 (time to contribute: \<48h) |
> | Proxy requests | ✅ |

> [accordion] ✅ Observability & data quality
>
> | Tools | Status |
> | - | - |
> | HTTP request logging | ✅ |
> | End-to-end type safety | ✅ |
> | Data runtime validation | ✅ |
> | OpenTelemetry export | ✅ |
> | Slack alerts on errors | ✅ |
> | Integration status API | ✅ |

> [accordion] ✅ Customization
>
> | Tools | Status |
> | - | - |
> | Create or customize use-cases | ✅ |
> | Pre-configured pagination | 🚫 (time to contribute: \<48h) |
> | Pre-configured rate-limit handling | ✅ |
> | Per-customer configurations | ✅ |

### Files

| Function name | Description | Type |
| - | - | - |
| `list-files` | Lists all the files of a Github repo given a specific branch | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |

### Others

| Function name | Description | Type |
| - | - | - |
| `add-issue-comment` | Create a new comment on an issue or pull request discussion thread | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-branch` | Create a branch ref from an existing commit SHA | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-issue` | Open a new GitHub issue in a repository. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-label` | Create a repository label with name, color, and description | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-or-update-file` | Create a new file or update existing repository contents in a branch. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-pull-request` | Open a pull request from one branch into another. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-release` | Publish a Git tag release for a repository. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-review-request` | Request reviewers or teams on an open pull request | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `create-tag-object` | Create an annotated Git tag object for a commit or object SHA. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-file` | Delete a file from a repository branch. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-label` | Delete a repository label by name | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-release` | Delete a release by release ID. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-branch` | Retrieve branch metadata and protection status. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-commit` | Retrieve a commit with changed files and stats | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-file-contents` | Retrieve a file or directory entry from repository contents. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-issue` | Fetch a single issue or pull request issue record by number. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-job-logs-download-url` | Get the API endpoint URL for a workflow job log download. Due to Nango proxy limitations with 302 redirects, this returns the API endpoint rather than the actual download URL. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-label` | Retrieve a single repository label by name. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-pull-request` | Fetch a single pull request by number. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-release` | Retrieve a single release by release ID. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-repository` | Retrieve repository metadata, visibility, default branch, and owner info. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-review` | Retrieve a pull request review by review ID. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-tag-ref` | Retrieve a tag ref or branch-style Git reference | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-workflow-run` | Retrieve a workflow run with status and conclusion details. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `get-workflow` | Retrieve metadata for a GitHub Actions workflow. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-branches` | List branches for a repository with optional pagination and protected filtering. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-commits` | List commits for a repository or branch with common filters | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-issue-comments` | List comments attached to an issue or pull request thread | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-issues` | List repository issues with state, assignee, label, and pagination filters. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-labels` | List repository labels with pagination | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-pull-request-files` | List files changed by a pull request | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-pull-request-reviews` | List reviews submitted on a pull request | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-pull-requests` | List pull requests for a repository with state and branch filters | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-release-assets` | List assets uploaded to a repository release. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-releases` | List published and draft releases for a repository. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-workflow-jobs` | List jobs in a workflow run attempt | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-workflow-runs` | List workflow runs for a repository or a specific workflow | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `list-workflows` | List GitHub Actions workflows configured in a repository. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `merge-pull-request` | Merge an open pull request using the selected merge method. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `rerun-workflow-run` | Rerun a completed or failed workflow run. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `search-code` | Search file contents across indexed GitHub repositories using code-search qualifiers. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `search-commits` | Search commits across indexed repositories by message, author, or metadata qualifiers. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `search-issues-and-pull-requests` | Search issues and pull requests across indexed repositories using GitHub's issue-search qualifiers. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `search-labels` | Search for labels within a specific repository by name or description. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `search-repositories` | Search public and accessible repositories using GitHub's repository-search qualifiers. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `search-topics` | Search GitHub topics (the tagging/categorization objects behind repository topic pages). | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `search-users` | Search GitHub user and organization accounts using user-search qualifiers. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `submit-pull-request-review` | Create a pull request review with approval, comment, or change request. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `trigger-workflow-dispatch` | Trigger a GitHub Actions workflow\_dispatch run for a workflow file or ID | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-issue` | Edit an issue's title, body, state, assignees, labels, or milestone. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-label` | Update a repository label's name, color, or description. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-pull-request` | Edit a pull request's title, body, base branch, or state. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `update-release` | Edit release metadata such as name, notes, or draft state. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `commits` | Sync commits for repositories and branches in scope | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `issues` | Sync issues for one or more GitHub repositories with incremental updates based on issue activity | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `pull-requests` | Sync pull requests for one or more GitHub repositories, including status, branches, and merge state. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `releases` | Sync releases for one or more GitHub repositories. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `repositories` | Sync repositories visible to the authenticated GitHub user or installation. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `repository-files` | Sync file metadata for a specific repository branch using the Git trees API recursively | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |
| `workflow-runs` | Sync GitHub Actions workflow runs for one or more repositories. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |

## Access requirements

| Pre-Requisites | Status | Comment |
| - | - | - |
| Paid dev account | ❓ | |
| Paid test account | ❓ | |
| Partnership | ❓ | |
| App review | ❓ | |
| Security audit | ❓ | |

## Setup guide

*No setup guide yet.*

> [!TIP]
>
> Need help getting started? Get help in the [community](https://nango.dev/slack).

> [!NOTE]
>
> Contribute improvements to the setup guide by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/github-pat.mdx)

## Useful links

* [Generate a Fine-grained personal access token in your Github account](https://github.com/settings/personal-access-tokens)
* [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
* [How to create 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)
* [How to create 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)
* [Authentication guide](https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28#authenticating-with-a-personal-access-token)
* [API docs](https://docs.github.com/en/rest?apiVersion=2022-11-28)

> [!NOTE]
>
> Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/github-pat.mdx)

## API gotchas

* GitHub provides two types of tokens for authentication:

1. **Classic Personal Access Tokens (PATs)** – These are the older, broad-scope tokens that grant access to a user's repositories, organizations, and settings.
2. **Fine-Grained Personal Access Tokens** – Introduced as a more secure alternative, these tokens allow for precise permission control at the repository and organization level.

* GitHub recommends using **Fine-grained PATs** whenever possible, as they provide better security and least-privilege access by allowing developers to specify the exact permissions and repositories they apply to. Classic PATs still work but are considered less secure due to their broad permissions

> [!NOTE]
>
> Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/github-pat.mdx)

## Going further

> [card] [Connect to Github (Personal Access Token)](https://nango.dev/docs/integrations/all/github-pat/connect)
>
> Guide to connect to Github (Personal Access Token) using Connect UI


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.