From 487c9f344d754621a4d9219f90ff60c8d80f448b Mon Sep 17 00:00:00 2001 From: ExpensiveKoala Date: Sat, 28 Sep 2024 23:44:17 -0700 Subject: [PATCH] Update update-set-implementation-lists.yml --- .../workflows/update-set-implementation-lists.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-set-implementation-lists.yml b/.github/workflows/update-set-implementation-lists.yml index cc27189efb9..274b57834fd 100644 --- a/.github/workflows/update-set-implementation-lists.yml +++ b/.github/workflows/update-set-implementation-lists.yml @@ -100,6 +100,7 @@ jobs: implementedCards: implemented, unimplementedScryfallLink: `https://scryfall.com/search?q=!"${unimplemented.map(e => e.cleanName).join('"OR!"')}"+e:${set[1]}` }); + foundIssue.state = unimplemented.length > 0 ? "open" : "closed" issuesToUpdate.push(foundIssue); } else { issuesToCreate.push({ @@ -110,13 +111,24 @@ jobs: unimplementedCards: unimplemented, implementedCards: implemented, unimplementedScryfallLink: `https://scryfall.com/search?q=!"${unimplemented.map(e => e.cleanName).join('"OR!"')}"+e:${set[1]}` - }) + }), + state: unimplemented.length > 0 ? "open" : "closed" }); } }); console.log("Issues to update: ", issuesToUpdate); console.log("Issues to create: ", issuesToCreate); + + issuesToUpdate.forEach(issue => { + github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + body: issue.body, + state: issue.state + }); + }); - uses: actions/github-script@v6.4.1 id: updatewiki with: