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

GitHub

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.

ScopeBaseAccess
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:


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.

  • DataGrail supports requests throttling to stay within 70-80% of specified service rate limits.
  • DataGrail processes API responses with HTTP 429 status to interrupt requests, waiting and retrying (using an exponential backoff strategy).

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

MethodEndpointPurposeDocs
POST/app/installations/installation_id/access_tokensExtract "installation_id" and authenticate as an installation.
POST/orgs/org/teamsFetch all "teams" in an "organization"
POST/repos/octocat/Spoon-Knife/comments/numberFor each found issue extract "comments_url" and get related "comments".
POST/search/issuesFor each found "installation" do search issues using configured identifiers
POST/teams/team_id/discussionsFetch all "discussions" on a team's page and select "discussions" body which includes the "text"
POST/teams/team_id/discussions/discussion_number/commentsFetch all discussion comments.
GET/user/installationsFetch app installations accessible to the user access token
POST/user/orgsFetch "organizations"
GET/users/username/installationFetch app installations accessible to the user access token
POSThttps://github.com/login/oauth/authorizeoptional 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.