update pr review labeler (#2297)

Update labeler-needsreview.yml
This commit is contained in:
Milon 2024-11-27 08:54:32 +01:00 committed by GitHub
parent ce1b132a50
commit cd949addd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 27 additions and 0 deletions

View File

@ -3,10 +3,17 @@
on:
pull_request_target:
types: [review_requested]
pull_request_review:
types: [submitted]
permissions:
pull-requests: write
contents: write
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 +21,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"