From bcaaa30cb7e837f75124c68d8b032938e005d096 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Mon, 17 Apr 2023 16:25:59 +0200 Subject: [PATCH 1/2] ci: Tag issues if last commenter is user --- .github/workflows/label-last-commenter.yml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/label-last-commenter.yml diff --git a/.github/workflows/label-last-commenter.yml b/.github/workflows/label-last-commenter.yml new file mode 100644 index 000000000000..3d05680916f6 --- /dev/null +++ b/.github/workflows/label-last-commenter.yml @@ -0,0 +1,31 @@ +name: 'Tag issues with last commenter' + +on: + issue_comment: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + if: ${{ !github.event.issue.pull_request }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Add label if commenter is not member + if: | + github.event.comment.author_association != 'COLLABORATOR' + && github.event.comment.author_association != 'MEMBER' + && github.event.comment.author_association != 'OWNER' + uses: actions-ecosystem/action-add-labels@v1 + with: + labels: 'Status: User responded' + + - name: Remove label if commenter is member + if: | + github.event.comment.author_association == 'COLLABORATOR' + || github.event.comment.author_association == 'MEMBER' + || github.event.comment.author_association == 'OWNER' + uses: actions-ecosystem/action-remove-labels@v1 + with: + labels: 'Status: User responded' From 9be0b5df1a726b5b08b2df56dc33b62a863c9c8c Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 18 Apr 2023 10:38:57 +0200 Subject: [PATCH 2/2] ref: Rename to `Waiting for: Team` --- .github/workflows/label-last-commenter.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/label-last-commenter.yml b/.github/workflows/label-last-commenter.yml index 3d05680916f6..2d938459de78 100644 --- a/.github/workflows/label-last-commenter.yml +++ b/.github/workflows/label-last-commenter.yml @@ -19,7 +19,7 @@ jobs: && github.event.comment.author_association != 'OWNER' uses: actions-ecosystem/action-add-labels@v1 with: - labels: 'Status: User responded' + labels: 'Waiting for: Team' - name: Remove label if commenter is member if: | @@ -28,4 +28,4 @@ jobs: || github.event.comment.author_association == 'OWNER' uses: actions-ecosystem/action-remove-labels@v1 with: - labels: 'Status: User responded' + labels: 'Waiting for: Team'