From b68ba22df35b4679852b0adc132f935947991d45 Mon Sep 17 00:00:00 2001 From: Xhofe Date: Sat, 26 Mar 2022 23:51:25 +0800 Subject: [PATCH] workflow: issue invalid bot --- .github/workflows/issue_invalid.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/issue_invalid.yml diff --git a/.github/workflows/issue_invalid.yml b/.github/workflows/issue_invalid.yml new file mode 100644 index 00000000..1faebadb --- /dev/null +++ b/.github/workflows/issue_invalid.yml @@ -0,0 +1,25 @@ +name: Issue Invalid + +on: + issues: + types: [labeled] + +jobs: + create-comment: + runs-on: ubuntu-latest + if: github.event.label.name == 'invalid' + steps: + - name: Create comment + uses: actions-cool/issues-helper@v2 + with: + actions: 'create-comment' + token: ${{ secrets.GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}, your issue is invalid and will be closed. + 你好 @${{ github.event.issue.user.login }},你的issue无效,将被关闭。 + - name: Close issue + uses: actions-cool/issues-helper@v2 + with: + actions: 'close-issue' + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file