diff --git a/dist/ruff-action/index.js b/dist/ruff-action/index.js index a648b79..dc177f2 100644 Binary files a/dist/ruff-action/index.js and b/dist/ruff-action/index.js differ diff --git a/src/download/download-version.ts b/src/download/download-version.ts index a2440f0..64f7bbe 100644 --- a/src/download/download-version.ts +++ b/src/download/download-version.ts @@ -158,6 +158,12 @@ async function getReleaseTagNames( owner: OWNER, repo: REPO, }); + const releaseTagNames = response.map((release) => release.tag_name); + if (releaseTagNames.length === 0) { + throw Error( + "Github API request failed while getting releases. Check the GitHub status page for outages. Try again later.", + ); + } return response.map((release) => release.tag_name); } @@ -177,6 +183,9 @@ async function getLatestVersion(githubToken: string) { const octokit = new PaginatingOctokit(); latestRelease = await getLatestRelease(octokit); } else { + core.error( + "Github API request failed while getting latest release. Check the GitHub status page for outages. Try again later.", + ); throw err; } }