Skip to content

Commit 232500c

Browse files
committed
Use browser_download_url instead of url
1 parent 16dc289 commit 232500c

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

lib/start-proxy-action.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/start-proxy.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,11 @@ test("getDownloadUrl returns fallback when there's no matching release asset", a
255255

256256
test("getDownloadUrl returns matching release asset", async (t) => {
257257
const assets = [
258-
{ name: "foo", url: "other-url" },
259-
{ name: startProxyExports.getProxyPackage(), url: "url-we-want" },
258+
{ name: "foo", browser_download_url: "other-url" },
259+
{
260+
name: startProxyExports.getProxyPackage(),
261+
browser_download_url: "url-we-want",
262+
},
260263
];
261264
mockGetReleaseByTag(assets);
262265

src/start-proxy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ export async function getDownloadUrl(
231231
for (const asset of cliRelease.data.assets) {
232232
if (asset.name === proxyPackage) {
233233
logger.info(
234-
`Found '${proxyPackage}' in release '${defaults.bundleVersion}' at '${asset.url}'`,
234+
`Found '${proxyPackage}' in release '${defaults.bundleVersion}' at '${asset.browser_download_url}'`,
235235
);
236236
return {
237-
url: asset.url,
237+
url: asset.browser_download_url,
238238
// The `update-job-proxy` doesn't have a version as such. Since we now bundle it
239239
// with CodeQL CLI bundle releases, we use the corresponding CLI version to
240240
// differentiate between (potentially) different versions of `update-job-proxy`.

0 commit comments

Comments
 (0)