From de674004c4d89d8f65a05c87a3bcbec360807a8c Mon Sep 17 00:00:00 2001 From: Whatstone Date: Sat, 18 Jan 2025 12:24:56 -0500 Subject: [PATCH 1/4] use BOT_TOKEN as a secret in approved labeler --- .github/workflows/labeler-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler-review.yml b/.github/workflows/labeler-review.yml index 9a4d76d7751..fcead9d384a 100644 --- a/.github/workflows/labeler-review.yml +++ b/.github/workflows/labeler-review.yml @@ -17,7 +17,7 @@ jobs: with: username: ${{ github.actor }} team: "content-maintainers,junior-maintainers" - GITHUB_TOKEN: ${{ secrets.LABELER_PAT }} + GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} # Frontier: LABELER_PAT Date: Sat, 18 Jan 2025 13:11:47 -0500 Subject: [PATCH 2/4] labeler review rework --- .github/workflows/labeler-review.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/labeler-review.yml b/.github/workflows/labeler-review.yml index fcead9d384a..62c8374018d 100644 --- a/.github/workflows/labeler-review.yml +++ b/.github/workflows/labeler-review.yml @@ -4,21 +4,13 @@ on: types: [submitted] jobs: add_label: - # Change the repository name after you've made sure the team name is correct for your fork! # Frontier: repo changed (space-wizards/space-station-14 < new-frontiers-14/frontier-station-14) - if: ${{ (github.repository == 'new-frontiers-14/frontier-station-14') && (github.event.review.state == 'APPROVED') }} + if: ${{ (github.repository == 'new-frontiers-14/frontier-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" - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} # Frontier: LABELER_PAT Date: Sat, 18 Jan 2025 13:17:19 -0500 Subject: [PATCH 3/4] remove permissions, minimize labeler --- .github/workflows/labeler-review.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/labeler-review.yml b/.github/workflows/labeler-review.yml index 62c8374018d..ac5feacc3a4 100644 --- a/.github/workflows/labeler-review.yml +++ b/.github/workflows/labeler-review.yml @@ -4,11 +4,6 @@ on: types: [submitted] jobs: add_label: - # Frontier: repo changed (space-wizards/space-station-14 < new-frontiers-14/frontier-station-14) - if: ${{ (github.repository == 'new-frontiers-14/frontier-station-14') && (github.event.review.state == 'approved') }} - permissions: - contents: read - pull-requests: write runs-on: ubuntu-latest steps: - uses: actions-ecosystem/action-add-labels@v1 From 25930d0ab87b0274fb9974c2e2fba8972d7336d6 Mon Sep 17 00:00:00 2001 From: Whatstone Date: Sat, 18 Jan 2025 13:18:45 -0500 Subject: [PATCH 4/4] add condition --- .github/workflows/labeler-review.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/labeler-review.yml b/.github/workflows/labeler-review.yml index ac5feacc3a4..97d55e03240 100644 --- a/.github/workflows/labeler-review.yml +++ b/.github/workflows/labeler-review.yml @@ -4,6 +4,7 @@ on: types: [submitted] jobs: add_label: + if: github.event.review.state == 'approved' runs-on: ubuntu-latest steps: - uses: actions-ecosystem/action-add-labels@v1