GitHub | DataGrail Documentation

Unlisted page

This page is unlisted. Search engines will not index it, and only users having a direct link can access it.


On this page

This documentation for the GitHub integration describes the technical capabilities of this integration, including authorization, scopes/permissions, and utilized endpoints. For more information on how to integrate GitHub, visit our connection instructions.

Version

This integration utilizes the GitHub REST API latest version.

Base URL

The base URL used for all GitHub API endpoints:

https://api.github.com

Authentication & Authorization

The DataGrail GitHub integration connects using OAuth 2.0.

Scopes

The GitHub integration requires specific scopes that must be granted in order to function for a given capability.

Scope Base Access
read:org ✅ ✅
repo:status ✅ ✅

Base Scopes

All base scopes must be granted in order to connect the integration with DataGrail. The remaining scopes are only required if enabling those capabilities.

Endpoints Utilized

DataGrail uses the following endpoints to authorize and test the connection:

Method Endpoint Purpose
GET /user Validate credentials
POST https://github.com/login/oauth/access_token Get access token
GET https://github.com/login/oauth/authorize Request authorization

Limits

Limits in GitHub are calculated using the leaky bucket algorithm. All requests that are made after rate limits have been exceeded are throttled and an HTTP 429 Too Many Requests error is returned. Requests succeed again after enough requests have emptied out of the bucket.


Capabilities

Access

DataGrail's GitHub integration provides Synchronous Access capabilities for the following supported identifier category: Email.

Data Interactions

For "Access" requests, DataGrail will take the following actions:

  1. Fetch app installations accessible to the user access token.
  2. For each installation, extract the username and fetch installation details by username.
  3. For each user installation, extract the installation_id and authenticate as an installation.
  4. For each installation, search issues using configured identifiers.
  5. For each issue, extract the comments_url and get related comments.
  6. Fetch organizations for the authenticated user.
  7. For each organization, fetch all teams in an organization that are visible to the authenticated user.
  8. For each team, fetch all discussions on a team's page and select discussions where the body includes text with configured identifiers.
  9. For each discussion, fetch all discussion comments.

Endpoints Utilized

Method Endpoint Purpose
POST /app/installations/installation_id/access_tokens Extract "installation_id" and authenticate as an installation.
POST /orgs/org/teams Fetch all "teams" in an "organization"
POST /repos/octocat/Spoon-Knife/comments/number For each found issue extract "comments_url" and get related "comments".
POST /search/issues For each found "installation" do search issues using configured identifiers
POST /teams/team_id/discussions Fetch all "discussions" on a team's page and select "discussions" body which includes the "text"
POST /teams/team_id/discussions/discussion_number/comments Fetch all discussion comments.
GET /user/installations Fetch app installations accessible to the user access token
POST /user/orgs Fetch "organizations"
GET /users/username/installation Fetch app installations accessible to the user access token
POST https://github.com/login/oauth/authorize optional purpose when a method specific reference url exists

Need help?

If you have any questions, please reach out to your dedicated Account Manager or contact us at support@datagrail.io.

Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.