mirror of
https://github.com/github/codeql-action
synced 2026-05-23 20:00:54 +03:00
Merge pull request #1945 from github/henrymercer/authenticate-api-url
Authenticate when downloading CodeQL Bundle from GHES API
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
|
||||
|
||||
## [UNRELEASED]
|
||||
|
||||
No user facing changes.
|
||||
- Provide an authentication token when downloading the CodeQL Bundle from the API of a GitHub Enterprise Server instance. [#1945](https://github.com/github/codeql-action/pull/1945)
|
||||
|
||||
## 2.22.2 - 12 Oct 2023
|
||||
|
||||
|
||||
Generated
+2
-1
@@ -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
+4
-1
@@ -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