From 08e0c5fdf57b4c92f175df3d704674676e117c13 Mon Sep 17 00:00:00 2001 From: Bai Date: Thu, 29 Jun 2023 11:12:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=20Issue=20GitHub=20A?= =?UTF-8?q?ctions=EF=BC=8C=E5=BD=93=E7=A0=94=E5=8F=91=E5=9B=A2=E9=98=9F?= =?UTF-8?q?=E6=88=90=E5=91=98=E8=AF=84=E8=AE=BA=E5=90=8E=E5=86=8D=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=20=E5=BE=85=E5=A4=84=E7=90=86=20=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/issue-comment.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issue-comment.yml b/.github/workflows/issue-comment.yml index 5388111d7..628cea3d9 100644 --- a/.github/workflows/issue-comment.yml +++ b/.github/workflows/issue-comment.yml @@ -23,15 +23,31 @@ jobs: add-label-if-not-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: Checkout repository + uses: actions/checkout@v2 + + - name: Get Repository Collaborators + id: collaborators + uses: octokit/request-action@v2.x + with: + route: GET /repos/{owner}/{repo}/collaborators + owner: ${{ github.repository_owner }} + repo: ${{ github.repository }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - run: "echo Collaborators: '${{ steps.collaborators.outputs.data }}'" + - name: Add require replay label + if: contains(steps.collaborators.outputs.data, github.event.comment.user.id) uses: actions-cool/issues-helper@v2 with: actions: 'add-labels' labels: '状态:待反馈' - name: Remove require handle label + if: contains(steps.collaborators.outputs.data, github.event.comment.user.id) uses: actions-cool/issues-helper@v2 with: actions: 'remove-labels'