Skip to main content

Github

GitHub is the world's leading software development platform that provides version control, project management, and collaboration tools for developers, enabling teams to build, ship, and maintain software through integrated CI/CD, code review, and community features.

Github icon

Power end-to-end data operations for your Github API with Nexla. Our bi-directional Github connector is purpose-built for Github, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Github or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Github workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a GitHub credential, you need to have a GitHub account with API access enabled. GitHub uses OAuth 2.0 authentication to securely authenticate API requests.

To set up OAuth 2.0 authentication for GitHub, you need to have a GitHub account. The OAuth 2.0 authorization flow allows Nexla to access your GitHub account on your behalf. Alternatively, you can use a GitHub personal access token (PAT) for authentication, which provides similar access without the OAuth flow. For detailed information about GitHub API authentication and setup, refer to the GitHub API documentation.

Authenticate

Credentials required

Authenticate using a GitHub Personal Access Token (classic or fine-grained)

FieldRequiredSecretDescription
Personal Access TokenYesYesGitHub PAT from Settings > Developer settings > Personal access tokens

Create a credential in Nexla

  1. To create a new GitHub credential, after selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – GitHub

GithubCred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

OAuth 2.0 Authentication

GitHub uses OAuth 2.0 authentication with Nexla's public application. The OAuth 2.0 authorization flow is handled automatically by Nexla, and most OAuth settings are pre-configured.

  1. Click the Authorize button to start the OAuth 2.0 authorization flow. You will be redirected to GitHub's authorization page where you can sign in to your GitHub account and grant permissions to Nexla.

    The OAuth 2.0 authorization flow allows Nexla to access your GitHub account on your behalf. You will be asked to grant permissions for accessing your GitHub repositories and data. The authorization process is handled automatically by Nexla, and you will be redirected back to Nexla once authorization is complete. The access token is sent in the Authorization header with the Bearer prefix (e.g., Bearer {token}) for all API requests to the GitHub API. For detailed information about GitHub OAuth 2.0 setup and available scopes, see the GitHub API documentation.

  2. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the GitHub connector tile, then select the credential that will be used to connect to the GitHub instance, and click Next; or, create a new GitHub credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common GitHub endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your data source for this endpoint.

Get All Pull Requests

Use this endpoint to fetch a list of all pull requests reports for a repository.

  • Enter the account owner of the repository in the Repository Owner field. This should be the GitHub username or organization name that owns the repository. The name is not case sensitive.

  • Enter the name of the repository in the Repository field. This should be the repository name. The name is not case sensitive.

  • The endpoint uses GET requests to https://api.github.com/repos/{owner}/{repo}/pulls where {owner} is the Repository Owner and {repo} is the Repository you provide. The endpoint URL is automatically constructed based on the GitHub API base URL, the repository owner, and the repository name.
  • The endpoint uses incrementing pagination, automatically fetching additional pages as needed. Pagination starts from page 1 and increments by 1 for each subsequent page. Nexla will continue fetching pages until all pull requests are retrieved.
  • The endpoint will return all pull requests for the specified repository. The response data is extracted from the root-level array in the API response ($[*]), with each pull request processed individually.

Repository owner and repository names are not case sensitive. The endpoint uses incrementing pagination (iteration.type: paging.incrementing) starting from page 1. The response data path is $[*], which extracts all items from the root-level array in the API response. For detailed information about listing pull requests, see the GitHub API documentation.

Get Reviews of Pull Request

Use this endpoint to fetch a list of all reviews for a pull request.

  • Enter the account owner of the repository in the Repository Owner field. This should be the GitHub username or organization name that owns the repository. The name is not case sensitive.

  • Enter the name of the repository in the Repository field. This should be the repository name. The name is not case sensitive.

  • Enter the number that identifies the pull request in the PR Number field. This should be the pull request number (not the pull request ID).

  • The endpoint uses GET requests to https://api.github.com/repos/{owner}/{repo}/pulls/{pr}/reviews where {owner} is the Repository Owner, {repo} is the Repository, and {pr} is the PR Number you provide. The endpoint URL is automatically constructed based on the GitHub API base URL, the repository owner, the repository name, and the pull request number.
  • The endpoint uses incrementing pagination, automatically fetching additional pages as needed. Pagination starts from page 1 and increments by 1 for each subsequent page. Nexla will continue fetching pages until all reviews are retrieved.
  • The endpoint will return all reviews for the specified pull request. The response data is extracted from the root-level array in the API response ($[*]), with each review processed individually.

Repository owner and repository names are not case sensitive. The PR number should be the pull request number (not the pull request ID). The endpoint uses incrementing pagination (iteration.type: paging.incrementing) starting from page 1. The response data path is $[*], which extracts all items from the root-level array in the API response. For detailed information about listing pull request reviews, see the GitHub API documentation.

Extract Files with a Specific Extension

Use this endpoint to extract all files with a specific extension from a repository.

  • Enter the file extension to extract from the repository in the Extension to Pull field. This should be the extension without the starting dot (e.g., md for Markdown files, js for JavaScript files).

  • Enter your repository identifier in the Repository Identifier field. This should be in the format user/repo or org/repo (e.g., octocat/Hello-World).

  • The endpoint uses a multi-step process: first, it searches for files with the specified extension using GitHub's code search API, then it retrieves the file contents for each matching file. The endpoint URL is automatically constructed based on the GitHub API base URL, the extension, and the repository identifier.
  • The endpoint does not use pagination and returns all matching files in a single request.
  • The endpoint will return the contents of all files with the specified extension from the repository. The response data is extracted from the search results and file contents, with each file processed individually.

File extensions should be entered without the starting dot (e.g., md for Markdown, not .md). Repository identifiers should be in the format user/repo or org/repo. The endpoint uses a multi-step process: first searching for files using GitHub's code search API, then retrieving file contents. The endpoint uses a static URL (iteration.type: static.url) for the search step and body-as-file iteration for retrieving file contents. For detailed information about GitHub code search, see the GitHub API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

GitHub data sources can also be manually configured to ingest data from any valid GitHub API endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom request headers and parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method and endpoint URL.

Enter the URL of the GitHub API endpoint from which this source will fetch data in the Set API URL field. This should be the complete URL including the protocol (https://) and any required path parameters. GitHub API endpoints typically follow the pattern https://api.github.com/{endpoint_path}.

Ensure the API endpoint URL is correct and accessible with your current credentials. You can test the endpoint using the Test button after configuring the URL. The endpoint requires OAuth 2.0 authentication via the Authorization: Bearer {token} header, which is handled automatically by your credential configuration. The endpoint also requires the Accept: application/vnd.github+json header, which is automatically included in requests. For detailed information about GitHub API endpoints and available APIs, see the GitHub API documentation.

Once all of the relevant settings have been configured, click the Create button in the upper right corner of the screen to save and create the new GitHub data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.