From 0153834e0efc04b952c3c1aed2fce34a006d805e Mon Sep 17 00:00:00 2001 From: Will Gillis <40799239+t-will-gillis@users.noreply.github.com> Date: Sat, 18 Nov 2023 12:01:17 -0800 Subject: [PATCH] Update wr-schedule-monthly.yml --- .github/workflows/wr-schedule-monthly.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wr-schedule-monthly.yml b/.github/workflows/wr-schedule-monthly.yml index 153007bdfe..85f96eb19c 100644 --- a/.github/workflows/wr-schedule-monthly.yml +++ b/.github/workflows/wr-schedule-monthly.yml @@ -18,6 +18,15 @@ jobs: steps: - run: echo "The 'Schedule Monthly' workflow succeeded. Continuing." + - name: Get owner url + id: get-owner-url + uses: actions/github-script@v7 + with: + script: | + const ownerURL = context.payload.repository.html_url; + console.log("Owner url: " + ownerURL); + return ownerURL; + - name: Get issue number id: get-issue-number uses: actions/github-script@v7 @@ -31,16 +40,9 @@ jobs: page: 1, }); const newIssueNumber = newIssue['data'][0]['number']; - console.log(newIssueNumber); + console.log("Latest issue number: " + newIssueNumber); return newIssueNumber; - - name: Get owner url - id: get-owner-url - uses: actions/github-script@v7 - with: - script: | - const owner = context.payload.repository.html_url; - console.log(owner); - return owner; + - name: Auto close issue run: gh issue close --comment "This issue is automatically closed after creation." "${{ steps.get-owner-url.outputs.result }}/issues/${{ steps.get-issue-number.outputs.result }}" env: