From 1ad1b8bcfc3d63c033f85aa07a799438a7062ad2 Mon Sep 17 00:00:00 2001 From: wChenonly Date: Mon, 11 Dec 2023 11:31:56 +0800 Subject: [PATCH] feat: add Issue Labeled --- .github/workflows/issue-labeled.yml | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/issue-labeled.yml diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml new file mode 100644 index 00000000..3f3098e6 --- /dev/null +++ b/.github/workflows/issue-labeled.yml @@ -0,0 +1,41 @@ +name: Issue Labeled + +on: + issues: + types: [labeled] + +permissions: + contents: read + +jobs: + reply-labeled: + permissions: + issues: write + runs-on: ubuntu-latest + steps: + - name: help wanted + if: github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted' + uses: actions-cool/issues-helper@v3 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to [send us a Pull Request](https://help.github.com/en/articles/creating-a-pull-request) for it. Please send your Pull Request to `main` branch, provide TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! + + - name: need more info + if: github.event.label.name == 'need reproduce' || github.event.label.name == 'need more info' + uses: actions-cool/issues-helper@v3 + with: + actions: 'create-comment' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}. Please provide an online reproduction demo by [stackblitz](https://stackblitz.com/edit/vite-7vr5lz) or a minimal GitHub repository. Issues marked with `need reproduce` will be closed if there is no activity within 3 days. For background, please refer to [Why reproductions are required](https://antfu.me/posts/why-reproductions-are-required). + + - name: invalid + if: github.event.label.name == 'invalid' + uses: actions-cool/issues-helper@v3 + with: + actions: 'create-comment, close-issue' + issue-number: ${{ github.event.issue.number }} + body: | + Hello @${{ github.event.issue.user.login }}, your issue has been closed because it does not conform to our issue requirements.