From 14871668e772aad6a6f12ba5d05498a11c6334cd Mon Sep 17 00:00:00 2001 From: Kenneth Seet <120318851+itstrueitstrueitsrealitsreal@users.noreply.github.com> Date: Sun, 28 Jul 2024 13:48:42 +0800 Subject: [PATCH] Update pr.yml --- .github/workflows/pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 87323617307..80c9e301f1f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -29,13 +29,14 @@ jobs: return match ? parseInt(match[1]) : null }; const issueNumber = extractIssueNumber(pr.data.body) + let isIssueOpen = false if (issueNumber) { const issue = await github.rest.issues.get({ owner: context.repo.owner, repo: context.repo.repo, issue_number: issueNumber }); - const isIssueOpen = issue.data.state === 'open' + isIssueOpen = issue.data.state === 'open' if (isTitleValid && isDescriptionValid && isIssueOpen) { return }