Skip to content

Commit

Permalink
fix: fetchLatestRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
tsi committed Jun 26, 2024
1 parent 4e6e721 commit 861f614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/actions/fetch-latest-release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const github = require('@actions/github');
const process = require('process');

async function findMostRecentRelease(owner, repo) {
const octokit = github.getOctokit(core.getInput('github_token', { required: true }));

const releases = await octokit.rest.repos.listReleases({
owner: owner,
repo: repo
Expand All @@ -23,8 +25,6 @@ async function findMostRecentRelease(owner, repo) {
async function fetchLatestRelease() {
const [owner, repo] = process.env['GITHUB_REPOSITORY'].split('/', 2);

const octokit = github.getOctokit(core.getInput('github_token', { required: true }));

core.info(`Fetching the latest release for \`${owner}/${repo}\``);

let latestRelease;
Expand Down

0 comments on commit 861f614

Please sign in to comment.