From 68d61d8b33f6eb87bb3762275777f6965c904f74 Mon Sep 17 00:00:00 2001 From: Milon Date: Tue, 26 Nov 2024 12:14:16 +0100 Subject: [PATCH] !!! --- .github/workflows/labeler-needsreview.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/labeler-needsreview.yml b/.github/workflows/labeler-needsreview.yml index 819b34b7bbd..b8355c39f04 100644 --- a/.github/workflows/labeler-needsreview.yml +++ b/.github/workflows/labeler-needsreview.yml @@ -3,10 +3,13 @@ on: pull_request_target: types: [review_requested] + pull_request_review: + types: [submitted] jobs: add_label: runs-on: ubuntu-latest + if: github.event_name == 'pull_request_target' steps: - uses: actions-ecosystem/action-add-labels@v1 with: @@ -14,3 +17,23 @@ jobs: - uses: actions-ecosystem/action-remove-labels@v1 with: labels: "S: Awaiting Changes" + + handle_review: + runs-on: ubuntu-latest + if: github.event_name == 'pull_request_review' + steps: + - uses: actions-ecosystem/action-add-labels@v1 + if: | + github.event.review.state == 'changes_requested' && + (github.event.review.author_association == 'OWNER' || + github.event.review.author_association == 'MEMBER') + with: + labels: "S: Awaiting Changes" + + - uses: actions-ecosystem/action-remove-labels@v1 + if: | + github.event.review.state == 'changes_requested' && + (github.event.review.author_association == 'OWNER' || + github.event.review.author_association == 'MEMBER') + with: + labels: "S: Needs Review"