Skip to content

Commit

Permalink
clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Oct 27, 2023
1 parent 4b48cb9 commit b3bbb58
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function run() {

const token = token_env != "" ? token_env : core.getInput("token", { required: false });
const sha = core.getInput("sha", { required: false });
let repo = core.getInput("repo", { required: false });
const owner_repo = core.getInput("repo", { required: false });
const maxReleases = parseInt(core.getInput("max_releases", { required: false }));
const releaseId = core.getInput("release_id", { required: true });
let name = core.getInput("asset_name", { required: true });
Expand All @@ -52,9 +52,7 @@ async function run() {

const octokit = getOctokit(token);
const hash = sha.substring(0, 6);
const repository = repo.split('/');
const owner = repository[0];
repo = repository[1];
const [owner, repo] = owner_repo.split('/');

core.info("Checking previous assets");
let assets = await octokit.rest.repos.listReleaseAssets({
Expand Down

0 comments on commit b3bbb58

Please sign in to comment.