Rename apiURL to instanceURL

This commit is contained in:
Michael B. Gale
2026-10-12 15:47:52 +01:00
parent a1794a03ff
commit 8fed29eed7
2 changed files with 10 additions and 8 deletions

8
lib/entry-points.js generated
View File

@@ -175707,8 +175707,8 @@ async function getCodeQLAssetDownloadURL(action, apiDetails, tagName, assetName,
return !self2.slice(0, index2).some((other) => isSameDownloadSource(source, other));
}
);
for (const [apiURL, repository] of uniqueDownloadSources) {
if (isSameDownloadSource(DEFAULT_DOWNLOAD_SOURCE, [apiURL, repository])) {
for (const [instanceURL, repository] of uniqueDownloadSources) {
if (isSameDownloadSource(DEFAULT_DOWNLOAD_SOURCE, [instanceURL, repository])) {
break;
}
const [repositoryOwner, repositoryName] = repository.split("/");
@@ -175721,14 +175721,14 @@ async function getCodeQLAssetDownloadURL(action, apiDetails, tagName, assetName,
for (const asset of release2.data.assets) {
if (asset.name === assetName) {
action.logger.info(
`Found ${assetKind} ${assetName} in ${repository} on ${apiURL} with URL ${asset.url}.`
`Found ${assetKind} ${assetName} in ${repository} on ${instanceURL} with URL ${asset.url}.`
);
return asset.url;
}
}
} catch (e) {
action.logger.info(
`Looked for ${assetKind} ${assetName} in ${repository} on ${apiURL} but got error ${e}.`
`Looked for ${assetKind} ${assetName} in ${repository} on ${instanceURL} but got error ${e}.`
);
}
}

View File

@@ -118,9 +118,11 @@ export async function getCodeQLAssetDownloadURL(
},
);
for (const [apiURL, repository] of uniqueDownloadSources) {
for (const [instanceURL, repository] of uniqueDownloadSources) {
// If we've reached the final case, short-circuit the API check since we know the asset exists and is public.
if (isSameDownloadSource(DEFAULT_DOWNLOAD_SOURCE, [apiURL, repository])) {
if (
isSameDownloadSource(DEFAULT_DOWNLOAD_SOURCE, [instanceURL, repository])
) {
break;
}
@@ -135,14 +137,14 @@ export async function getCodeQLAssetDownloadURL(
for (const asset of release.data.assets) {
if (asset.name === assetName) {
action.logger.info(
`Found ${assetKind} ${assetName} in ${repository} on ${apiURL} with URL ${asset.url}.`,
`Found ${assetKind} ${assetName} in ${repository} on ${instanceURL} with URL ${asset.url}.`,
);
return asset.url;
}
}
} catch (e) {
action.logger.info(
`Looked for ${assetKind} ${assetName} in ${repository} on ${apiURL} but got error ${e}.`,
`Looked for ${assetKind} ${assetName} in ${repository} on ${instanceURL} but got error ${e}.`,
);
}
}