Skip to content

Commit

Permalink
- add support for GHE in github checks integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Bratin committed Oct 18, 2019
1 parent caf593c commit 7d17c4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/platforms/github/comms/checks/githubAppSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ const jwtForGitHubAuth = (appID: string, key: string) => {
// Step 2 - Use App signed JWT to grab a per-installation

const requestAccessTokenForInstallation = (appID: string, installationID: number, key: string) => {
const url = `https://api.github.com/installations/${installationID}/access_tokens`
const apiUrl = process.env["DANGER_GITHUB_API_BASE_URL"]
? process.env["DANGER_GITHUB_API_BASE_URL"]
: "https://api.github.com"
const url = `${apiUrl}/installations/${installationID}/access_tokens`
const headers = {
Accept: "application/vnd.github.machine-man-preview+json",
Authorization: `Bearer ${jwtForGitHubAuth(appID, key)}`,
Expand Down

0 comments on commit 7d17c4c

Please sign in to comment.