From 791f66cddab967aa66ad7af76d7c8ad2f876c145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=B9=BF?= Date: Thu, 11 Jun 2026 13:58:19 +0800 Subject: [PATCH] Enhance issue-comment workflow with permissions and label updates Updated the issue-comment workflow to include permissions and modify label handling. --- .github/workflows/issue-comment.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/issue-comment.yml b/.github/workflows/issue-comment.yml index 69c00caef..1e5d4d7fe 100644 --- a/.github/workflows/issue-comment.yml +++ b/.github/workflows/issue-comment.yml @@ -7,19 +7,23 @@ name: Add issues workflow labels jobs: add-label-if-is-author: runs-on: ubuntu-latest - if: (github.event.issue.user.id == github.event.comment.user.id) && !github.event.issue.pull_request && (github.event.issue.state == 'open') - steps: - - name: Add require handle label - uses: actions-cool/issues-helper@v2 - with: - actions: 'add-labels' - labels: '🔔 Pending processing' + permissions: + issues: write + pull-requests: write - - name: Remove require reply label - uses: actions-cool/issues-helper@v2 - with: - actions: 'remove-labels' - labels: '⏳ Pending feedback' + if: > + (github.event.issue.user.id == github.event.comment.user.id) && + !github.event.issue.pull_request && + (github.event.issue.state == 'open') + + steps: + - name: Update labels + run: | + gh issue edit "${{ github.event.issue.number }}" \ + --add-label "🔔 Pending processing" \ + --remove-label "⏳ Pending feedback" + env: + GH_TOKEN: ${{ github.token }} add-label-if-is-member: runs-on: ubuntu-latest