From 4329d8f53a80e111350a887ae976609a1cfea192 Mon Sep 17 00:00:00 2001 From: Qinyang Liu <93815242+willow-god@users.noreply.github.com> Date: Thu, 4 Jul 2024 22:06:10 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=93=E6=9B=B4=E6=96=B0issue=EF=BC=8C?= =?UTF-8?q?=E5=BD=93=E5=BE=97=E5=88=B0=E9=82=AE=E7=AE=B1=E7=9A=84=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E6=97=B6=E6=B7=BB=E5=8A=A0=E6=A0=87=E7=AD=BE=E5=B9=B6?= =?UTF-8?q?=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deal_subscribe_issue.yml | 37 +++++++++------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deal_subscribe_issue.yml b/.github/workflows/deal_subscribe_issue.yml index c1685d5..6bd022c 100644 --- a/.github/workflows/deal_subscribe_issue.yml +++ b/.github/workflows/deal_subscribe_issue.yml @@ -6,36 +6,29 @@ on: jobs: handle_email_issues: + if: startsWith(github.event.issue.title, '[e-mail]') runs-on: ubuntu-latest - permissions: - issues: write steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Add subscribed label - if: startsWith(github.event.issue.title, '[e-mail]') - run: | - gh issue edit $NUMBER --add-label subscribed - env: - GH_TOKEN: ${{ secrets.PAT_TOKEN }} - GH_REPO: ${{ github.repository }} - NUMBER: ${{ github.event.issue.number }} + uses: actions-cool/issues-helper@v3 + with: + actions: 'add-labels' + token: ${{ secrets.PAT_TOKEN }} + issue-number: ${{ github.event.issue.number }} + labels: 'subscribed' - name: Comment on issue - if: startsWith(github.event.issue.title, '[e-mail]') - run: | - gh issue comment $NUMBER --body "$BODY" - env: - GH_TOKEN: ${{ secrets.PAT_TOKEN }} - GH_REPO: ${{ github.repository }} - NUMBER: ${{ github.event.issue.number }} - BODY: > - 您已订阅本站更新,若有新文章将通过邮箱推送给您,谢谢! + uses: actions-cool/issues-helper@v3 + with: + actions: 'create-comment' + token: ${{ secrets.PAT_TOKEN }} + issue-number: ${{ github.event.issue.number }} + body: | + 🤩你好呀! ${{ github.event.issue.user.login }}!你已经成功通过邮件订阅了清羽飞扬小站啦!若有新文章将通过邮箱推送给你!谢谢你的订阅! + 😥如果您实在想要关闭订阅,在右下角直接删除这个issue就好!咕咕咕咕咕咕咕! - name: Close issue - if: startsWith(github.event.issue.title, '[e-mail]') uses: actions-cool/issues-helper@v3 with: actions: 'close-issue'