mirror of
https://github.com/github/codeql-action.git
synced 2026-05-04 04:40:09 +00:00
Use browser_download_url instead of url
This commit is contained in:
Generated
+2
-2
@@ -49528,10 +49528,10 @@ async function getDownloadUrl(logger) {
|
||||
for (const asset of cliRelease.data.assets) {
|
||||
if (asset.name === proxyPackage) {
|
||||
logger.info(
|
||||
`Found '${proxyPackage}' in release '${bundleVersion}' at '${asset.url}'`
|
||||
`Found '${proxyPackage}' in release '${bundleVersion}' at '${asset.browser_download_url}'`
|
||||
);
|
||||
return {
|
||||
url: asset.url,
|
||||
url: asset.browser_download_url,
|
||||
// The `update-job-proxy` doesn't have a version as such. Since we now bundle it
|
||||
// with CodeQL CLI bundle releases, we use the corresponding CLI version to
|
||||
// differentiate between (potentially) different versions of `update-job-proxy`.
|
||||
|
||||
@@ -255,8 +255,11 @@ test("getDownloadUrl returns fallback when there's no matching release asset", a
|
||||
|
||||
test("getDownloadUrl returns matching release asset", async (t) => {
|
||||
const assets = [
|
||||
{ name: "foo", url: "other-url" },
|
||||
{ name: startProxyExports.getProxyPackage(), url: "url-we-want" },
|
||||
{ name: "foo", browser_download_url: "other-url" },
|
||||
{
|
||||
name: startProxyExports.getProxyPackage(),
|
||||
browser_download_url: "url-we-want",
|
||||
},
|
||||
];
|
||||
mockGetReleaseByTag(assets);
|
||||
|
||||
|
||||
+2
-2
@@ -231,10 +231,10 @@ export async function getDownloadUrl(
|
||||
for (const asset of cliRelease.data.assets) {
|
||||
if (asset.name === proxyPackage) {
|
||||
logger.info(
|
||||
`Found '${proxyPackage}' in release '${defaults.bundleVersion}' at '${asset.url}'`,
|
||||
`Found '${proxyPackage}' in release '${defaults.bundleVersion}' at '${asset.browser_download_url}'`,
|
||||
);
|
||||
return {
|
||||
url: asset.url,
|
||||
url: asset.browser_download_url,
|
||||
// The `update-job-proxy` doesn't have a version as such. Since we now bundle it
|
||||
// with CodeQL CLI bundle releases, we use the corresponding CLI version to
|
||||
// differentiate between (potentially) different versions of `update-job-proxy`.
|
||||
|
||||
Reference in New Issue
Block a user