From e2636d2e4f6b1eb32a4bde1bbdb849c62c21436d Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 12 Sep 2025 11:15:03 +0100 Subject: [PATCH] Change "current release" to "linked release" --- lib/start-proxy-action.js | 8 ++++---- src/start-proxy.test.ts | 2 +- src/start-proxy.ts | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 239f4662b..9d9d46230 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -49513,7 +49513,7 @@ function getProxyPackage() { function getFallbackUrl(proxyPackage) { return `${UPDATEJOB_PROXY_URL_PREFIX}${proxyPackage}`; } -async function getCurrentRelease() { +async function getLinkedRelease() { return getApiClient().rest.repos.getReleaseByTag({ owner: "github", repo: "codeql-action", @@ -49523,7 +49523,7 @@ async function getCurrentRelease() { async function getDownloadUrl(logger) { const proxyPackage = getProxyPackage(); try { - const cliRelease = await getCurrentRelease(); + const cliRelease = await getLinkedRelease(); for (const asset of cliRelease.data.assets) { if (asset.name === proxyPackage) { logger.info( @@ -49540,11 +49540,11 @@ async function getDownloadUrl(logger) { } } catch (ex) { logger.warning( - `Failed to retrieve information about the current release: ${getErrorMessage(ex)}` + `Failed to retrieve information about the linked release: ${getErrorMessage(ex)}` ); } logger.info( - `Did not find '${proxyPackage}' in current release, falling back to hard-coded version.` + `Did not find '${proxyPackage}' in the linked release, falling back to hard-coded version.` ); return { url: getFallbackUrl(proxyPackage), diff --git a/src/start-proxy.test.ts b/src/start-proxy.test.ts index e344c1773..dfd55d72f 100644 --- a/src/start-proxy.test.ts +++ b/src/start-proxy.test.ts @@ -224,7 +224,7 @@ function mockGetReleaseByTag(assets?: Array<{ name: string; url?: string }>) { return mockClient; } -test("getDownloadUrl returns fallback when `getCurrentRelease` rejects", async (t) => { +test("getDownloadUrl returns fallback when `getLinkedRelease` rejects", async (t) => { mockGetReleaseByTag(); const info = await startProxyExports.getDownloadUrl(getRunnerLogger(true)); diff --git a/src/start-proxy.ts b/src/start-proxy.ts index 2de9b5bbb..dd1e443b7 100644 --- a/src/start-proxy.ts +++ b/src/start-proxy.ts @@ -203,7 +203,7 @@ export function getFallbackUrl(proxyPackage: string): string { * * @returns The response from the GitHub API. */ -export async function getCurrentRelease() { +export async function getLinkedRelease() { return getApiClient().rest.repos.getReleaseByTag({ owner: "github", repo: "codeql-action", @@ -225,7 +225,7 @@ export async function getDownloadUrl( try { // Try to retrieve information about the CLI bundle release pointed at by `defaults.json`. - const cliRelease = await getCurrentRelease(); + const cliRelease = await getLinkedRelease(); // Search the release's assets to find the one we are looking for. for (const asset of cliRelease.data.assets) { @@ -244,13 +244,13 @@ export async function getDownloadUrl( } } catch (ex) { logger.warning( - `Failed to retrieve information about the current release: ${getErrorMessage(ex)}`, + `Failed to retrieve information about the linked release: ${getErrorMessage(ex)}`, ); } // Fallback to the hard-coded URL. logger.info( - `Did not find '${proxyPackage}' in current release, falling back to hard-coded version.`, + `Did not find '${proxyPackage}' in the linked release, falling back to hard-coded version.`, ); return { url: getFallbackUrl(proxyPackage),