From 549e92e35153ac6c8ecd0d527ffc394b540c141e Mon Sep 17 00:00:00 2001 From: Maxr1998 Date: Mon, 22 May 2023 21:00:07 +0200 Subject: [PATCH] Fix milestone property always being undefined and thus non-null --- .github/workflows/repo-milestone.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/repo-milestone.yaml b/.github/workflows/repo-milestone.yaml index d897123ab..4d4170b4b 100644 --- a/.github/workflows/repo-milestone.yaml +++ b/.github/workflows/repo-milestone.yaml @@ -20,17 +20,18 @@ jobs: const repo = context.repo.repo; const pr_id = context.issue.number; - const pr = await github.rest.issues.get({ + let response = await github.rest.issues.get({ owner, repo, issue_number: pr_id, }); + const pr = response.data; if (pr.milestone !== null) { return; } - const response = await github.rest.issues.listMilestones({ + response = await github.rest.issues.listMilestones({ owner, repo, state: 'open',