Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/start-proxy-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/start-proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Comment on lines +258 to +262
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test mock data structure is inconsistent with the mockGetReleaseByTag function signature which expects Array<{ name: string; url?: string }>. The function should be updated to accept browser_download_url property or use a more flexible type to match the actual GitHub API response structure.

Copilot uses AI. Check for mistakes.

];
mockGetReleaseByTag(assets);

Expand Down
4 changes: 2 additions & 2 deletions src/start-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Loading