From eebf06d9d611063410233efae983efbe52c8b493 Mon Sep 17 00:00:00 2001 From: Saphire Lattice Date: Wed, 20 Nov 2024 08:03:52 +0700 Subject: [PATCH] Automatically add "Approved" to maintainer PRs (#33337) * Add an Approved labeler for maintainer PRs * Be extra safe with conditions --- .github/workflows/labeler-review.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/labeler-review.yml diff --git a/.github/workflows/labeler-review.yml b/.github/workflows/labeler-review.yml new file mode 100644 index 0000000000..79be86a005 --- /dev/null +++ b/.github/workflows/labeler-review.yml @@ -0,0 +1,23 @@ +name: "Labels: Approved" +on: + pull_request_review: + types: [submitted] +jobs: + add_label: + # Change the repository name after you've made sure the team name is correct for your fork! + if: ${{ (github.repository == 'space-wizards/space-station-14') && (github.event.review.state == 'APPROVED') }} + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: tspascoal/get-user-teams-membership@v3 + id: checkUserMember + with: + username: ${{ github.actor }} + team: "content-maintainers,junior-maintainers" # CHANGE TEAM NAME HERE PLEASE <------ + GITHUB_TOKEN: ${{ secrets.PAT }} + - if: ${{ steps.checkUserMember.outputs.isTeamMember == 'true' }} + uses: actions-ecosystem/action-add-labels@v1 + with: + labels: "PR: Approved" \ No newline at end of file -- 2.51.2