File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export class GitHubAPI {
52
52
// A token should have been set by this point
53
53
const token = accessTokenForApp || this . token !
54
54
55
- const host = process . env [ "DANGER_GITHUB_API_BASE_URL" ] || process . env [ "GITHUB_URL" ] || undefined
55
+ const host = process . env [ "DANGER_GITHUB_API_BASE_URL" ] || "https://api.github.com"
56
56
const options : ConstructorParameters < typeof GitHubNodeAPI > [ 0 ] & { debug : boolean } = {
57
57
debug : ! ! process . env . LOG_FETCH_REQUESTS ,
58
58
baseUrl : host ,
@@ -515,7 +515,7 @@ ${file.patch}
515
515
}
516
516
517
517
const containsBase = path . startsWith ( "http" )
518
- const baseUrl = process . env [ "DANGER_GITHUB_API_BASE_URL" ] || process . env [ "GITHUB_URL" ] || "https://api.github.com"
518
+ const baseUrl = process . env [ "DANGER_GITHUB_API_BASE_URL" ] || "https://api.github.com"
519
519
const url = containsBase ? path : `${ baseUrl } /${ path } `
520
520
521
521
let customAccept = { }
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export async function getGitHubFileContents(
61
61
) {
62
62
const refString = ref ? `?ref=${ ref } ` : ""
63
63
const containsBase = path . startsWith ( "http" )
64
- const baseUrl = process . env [ "DANGER_GITHUB_API_BASE_URL" ] || process . env [ "GITHUB_URL" ] || "https://api.github.com"
64
+ const baseUrl = process . env [ "DANGER_GITHUB_API_BASE_URL" ] || "https://api.github.com"
65
65
const URLPath = `repos/${ repoSlug } /contents/${ path } ${ refString } `
66
66
const url = containsBase ? URLPath : `${ baseUrl } /${ URLPath } `
67
67
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export const jsonDSLGenerator = async (
39
39
github : {
40
40
accessToken : process . env [ "DANGER_GITHUB_API_TOKEN" ] || process . env [ "GITHUB_TOKEN" ] || "NO_TOKEN" ,
41
41
additionalHeaders : { } ,
42
- baseURL : process . env [ "DANGER_GITHUB_API_BASE_URL" ] || process . env [ "GITHUB_URL" ] || undefined ,
42
+ baseURL : process . env [ "DANGER_GITHUB_API_BASE_URL" ] || "https://api.github.com" ,
43
43
} ,
44
44
cliArgs,
45
45
} ,
You can’t perform that action at this time.
0 commit comments