From 72599ce706d9f1aec4e9d6672cb2e5f73d1854f1 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Fri, 31 Mar 2023 17:55:18 +0200 Subject: [PATCH] chore: label "p:backlog" on issue automatically close issue with comment --- .../workflows/close-and-put-in-backlog.yml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/close-and-put-in-backlog.yml diff --git a/.github/workflows/close-and-put-in-backlog.yml b/.github/workflows/close-and-put-in-backlog.yml new file mode 100644 index 000000000..f2fbe1ac4 --- /dev/null +++ b/.github/workflows/close-and-put-in-backlog.yml @@ -0,0 +1,27 @@ +on: + issues: + types: [labeled] + +jobs: + comment: + if: github.event.label.name == 'p:backlog' + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + with: + script: | + const welcomeMessage = ` + Your issue is now part of the official [backlog](https://github.com/orgs/plantuml/projects/4). + For technical reason, it has been put at close state but it's really still open for us. + You can by the way go on and put any comment in this issue. + + The main reason why we put this issue in the backlog is that we try to group issues together so that we fix them together, as similar issues often impact the same code area. + + Please be patient, but stay tuned! 🙂`; + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: welcomeMessage + }) + - uses: peter-evans/close-issue@v2 \ No newline at end of file