Skip to content

Commit

Permalink
Merge pull request #931 from adam-bratin/topic/fix-github-checks-inte…
Browse files Browse the repository at this point in the history
…gration

Bugfix: #930
  • Loading branch information
orta authored Oct 18, 2019
2 parents caf593c + 7d17c4c commit 3742580
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 3742580

Please sign in to comment.