Skip to content

Commit

Permalink
fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
timpuida committed Nov 12, 2024
1 parent 9378a47 commit ac0b6c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
group,
info,
setFailed,
warning,
setOutput,
warning,
} from "@actions/core";
import { context, getOctokit } from "@actions/github";
import type { GitHub } from "@actions/github/lib/utils.js";
Expand Down Expand Up @@ -83,13 +83,14 @@ const handleUnupdatablePullRequest = async (
info(`Commented: ${newComment.html_url}`);
} catch (error: unknown) {
const { owner, repo } = context.repo;
let unmergedPrsJSON = getInput("unmerged_prs");
const unmergedPrsJSON = getInput("unmerged_prs");
let unmergedPrs: string[];
try {
unmergedPrs = JSON.parse(unmergedPrsJSON);
unmergedPrs = JSON.parse(unmergedPrsJSON) as string[];
} catch {
unmergedPrs = [];
}

unmergedPrs.push(`/${owner}/${repo}/issues/${number}`);
setOutput("unmerged_prs", JSON.stringify(unmergedPrs));
warning(ensureError(error));
Expand Down

0 comments on commit ac0b6c1

Please sign in to comment.