mirror of
https://github.com/github/codeql-action.git
synced 2026-10-31 09:59:43 +00:00
Ensure consistent apiDetails in getReleaseByVersion and getProxyBinaryPath
This commit is contained in:
14
lib/entry-points.js
generated
14
lib/entry-points.js
generated
@@ -187796,8 +187796,8 @@ function getProxyPackage(platform2) {
|
||||
function getFallbackUrl(proxyPackage) {
|
||||
return `${UPDATEJOB_PROXY_URL_PREFIX}${proxyPackage}`;
|
||||
}
|
||||
async function getReleaseByVersion(version) {
|
||||
return getApiClient().rest.repos.getReleaseByTag({
|
||||
async function getReleaseByVersion(env, apiDetails, version) {
|
||||
return getApiClient(env, apiDetails).rest.repos.getReleaseByTag({
|
||||
owner: "github",
|
||||
repo: "codeql-action",
|
||||
tag: version
|
||||
@@ -187807,7 +187807,7 @@ async function getCliVersionFromFeatures(features) {
|
||||
const gitHubVersion = await getGitHubVersion();
|
||||
return await features.getEnabledDefaultCliVersions(gitHubVersion.type);
|
||||
}
|
||||
async function getDownloadUrl(action) {
|
||||
async function getDownloadUrl(action, apiDetails) {
|
||||
let platform2 = getBundlePlatform(action.platform, action.arch);
|
||||
if (platform2 === void 0) {
|
||||
action.logger.warning(
|
||||
@@ -187824,7 +187824,11 @@ async function getDownloadUrl(action) {
|
||||
cliVersion,
|
||||
tagName: bundleVersion
|
||||
};
|
||||
const cliRelease = await getReleaseByVersion(versionInfo.tagName);
|
||||
const cliRelease = await getReleaseByVersion(
|
||||
action.env,
|
||||
apiDetails,
|
||||
versionInfo.tagName
|
||||
);
|
||||
for (const asset of cliRelease.data.assets) {
|
||||
if (asset.name === proxyPackage) {
|
||||
action.logger.info(
|
||||
@@ -187898,7 +187902,7 @@ async function getProxyBinaryPath(action) {
|
||||
const apiDetails = getApiDetails();
|
||||
const client = new InstanceApiClient(apiDetails);
|
||||
const proxyFileName = getProxyFilename();
|
||||
const proxyInfo = await getDownloadUrl(action);
|
||||
const proxyInfo = await getDownloadUrl(action, apiDetails);
|
||||
let proxyBin = toolcache4.find(proxyFileName, proxyInfo.version);
|
||||
if (!proxyBin) {
|
||||
const authorization = client.getAuthorizationHeaderFor(
|
||||
|
||||
Reference in New Issue
Block a user