mirror of
https://github.com/github/codeql-action.git
synced 2026-04-02 01:32:17 +00:00
Provide token when downloading from GHES API
This commit is contained in:
3
lib/setup-codeql.js
generated
3
lib/setup-codeql.js
generated
@@ -411,7 +411,8 @@ async function downloadCodeQL(codeqlURL, maybeBundleVersion, maybeCliVersion, ap
|
||||
if (searchParams.has("token")) {
|
||||
logger.debug("CodeQL tools URL contains an authorization token.");
|
||||
}
|
||||
else if (codeqlURL.startsWith(`${apiDetails.url}/`)) {
|
||||
else if (codeqlURL.startsWith(`${apiDetails.url}/`) ||
|
||||
(apiDetails.apiURL && codeqlURL.startsWith(`${apiDetails.apiURL}/`))) {
|
||||
logger.debug("Providing an authorization token to download CodeQL tools.");
|
||||
authorization = `token ${apiDetails.auth}`;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -546,7 +546,10 @@ export async function downloadCodeQL(
|
||||
let authorization: string | undefined = undefined;
|
||||
if (searchParams.has("token")) {
|
||||
logger.debug("CodeQL tools URL contains an authorization token.");
|
||||
} else if (codeqlURL.startsWith(`${apiDetails.url}/`)) {
|
||||
} else if (
|
||||
codeqlURL.startsWith(`${apiDetails.url}/`) ||
|
||||
(apiDetails.apiURL && codeqlURL.startsWith(`${apiDetails.apiURL}/`))
|
||||
) {
|
||||
logger.debug("Providing an authorization token to download CodeQL tools.");
|
||||
authorization = `token ${apiDetails.auth}`;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user