Merge pull request #1945 from github/henrymercer/authenticate-api-url
Authenticate when downloading CodeQL Bundle from GHES API
This commit is contained in:
commit
82ba90b1d9
4 changed files with 8 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue