Change from convenience method to rest command

This commit is contained in:
Justin Hutchings
2024-08-26 23:19:44 +00:00
committed by GitHub
parent b241c92568
commit 6b81b8e569
3 changed files with 3 additions and 7 deletions

View File

@@ -160,9 +160,7 @@ export default class ComponentDetection {
core.debug("Attempting to download latest release from " + serverUrl);
try {
const latestRelease = await octokit.rest.repos.getLatestRelease({
owner, repo
});
const latestRelease = await octokit.request("GET /repos/{owner}/{repo}/releases/latest", {owner, repo});
var downloadURL: string = "";
const assetName = process.platform === "win32" ? "component-detection-win-x64.exe" : "component-detection-linux-x64";