> ## 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

> Integrate your application with the GitHub API

## 🚀 Quickstart

Connect to GitHub with Nango and see data flow in 2 minutes.

**1. Create the integration**

In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *GitHub*.

> [!NOTE]
>
> Nango has a [Nango-managed OAuth app](https://nango.dev/docs/guides/auth/auth-guide.md#nango-managed-oauth-apps) you can use in development and production. Select it when you create the integration.

**2. Authorize GitHub**

Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then log in to GitHub. Later, you'll let your users do the same directly from your app.

**3. Call the GitHub API**

Let's make your first request to the GitHub API. Replace the placeholders below with your [Environment API key](https://nango.dev/docs/reference/backend/http-api/api-keys.md), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

> [tab] cURL
>
> ```bash theme={null}
> curl "https://api.nango.dev/proxy/repos" \
>   -H "Authorization: Bearer <NANGO-API-KEY>" \
>   -H "Provider-Config-Key: <INTEGRATION-ID>" \
>   -H "Connection-Id: <CONNECTION-ID>"
> ```

> [tab] Node
>
> Install Nango's backend SDK with `npm i @nangohq/node`. Then run:
>
> ```typescript theme={null}
> import { Nango } from '@nangohq/node';
>
> const nango = new Nango({ apiKey: '<NANGO-API-KEY>' });
>
> const res = await nango.get({
>     endpoint: '/repos',
>     providerConfigKey: '<INTEGRATION-ID>',
>     connectionId: '<CONNECTION-ID>'
> });
>
> console.log(res.data);
> ```

Or fetch credentials with the [Node SDK](https://nango.dev/docs/reference/backend/backend-sdk/node.md#get-a-connection-with-credentials) or [API](https://nango.dev/docs/reference/backend/http-api/connections/get.md).

✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

**4. Implement Nango in your app**

Follow our [Auth implementation guide](https://nango.dev/docs/guides/primitives/auth.md) to integrate Nango in your app.

To use your own OAuth app instead of the Nango-managed one, follow the setup guide linked below.

## 📚 GitHub Integration Guides

Nango maintained guides for common use cases.

* [How to register your own GitHub OAuth app](https://nango.dev/docs/api-integrations/github/how-to-register-your-own-github-api-oauth-app)\
  Register an OAuth app with GitHub and obtain credentials to connect it to Nango

* [How to set up a GitHub App with Nango](https://nango.dev/docs/api-integrations/github/how-to-set-up-a-github-app-with-nango)\
  Learn the differences between GitHub Apps and OAuth Apps, and how to configure a GitHub App in Nango

Official docs: [GitHub REST API Documentation](https://docs.github.com/en/rest)

## 🧩 Pre-built syncs & tools for GitHub

Explore Nango-provided tools in your dashboard. Extend and customize them to fit your needs.

### 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) |

***


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