From 285a4919cf71ca2402af8caee8f89456305677a1 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 19 Apr 2023 18:42:03 +0200 Subject: [PATCH 1/2] ci: Improve last commenter action --- .github/workflows/label-last-commenter.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/label-last-commenter.yml b/.github/workflows/label-last-commenter.yml index 2d938459de78..ee98ff66e0ef 100644 --- a/.github/workflows/label-last-commenter.yml +++ b/.github/workflows/label-last-commenter.yml @@ -5,13 +5,11 @@ on: types: [created] jobs: - deploy: + toggle_labels: + name: Toggle Labels 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' From 2c5df71c457998222ffaa0c08d3cd20bb8be9710 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Thu, 20 Apr 2023 08:57:30 +0200 Subject: [PATCH 2/2] Do not run for closed issues --- .github/workflows/label-last-commenter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/label-last-commenter.yml b/.github/workflows/label-last-commenter.yml index ee98ff66e0ef..7e7629e95bc5 100644 --- a/.github/workflows/label-last-commenter.yml +++ b/.github/workflows/label-last-commenter.yml @@ -11,10 +11,12 @@ jobs: if: ${{ !github.event.issue.pull_request }} steps: - name: Add label if commenter is not member + # Note: We only add the label if the issue is still open if: | github.event.comment.author_association != 'COLLABORATOR' && github.event.comment.author_association != 'MEMBER' && github.event.comment.author_association != 'OWNER' + && !github.event.issue.closed uses: actions-ecosystem/action-add-labels@v1 with: labels: 'Waiting for: Team'