From 346d4743ad670ef5e9a80d39cc5a2b1f61729cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar=20Rubio?= Date: Tue, 28 May 2024 14:37:26 +0200 Subject: [PATCH] Add `permissions` to Remove Labels workflow (#11051) --- .github/workflows/remove-labels.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/remove-labels.yml b/.github/workflows/remove-labels.yml index 982538c60..b476694ed 100644 --- a/.github/workflows/remove-labels.yml +++ b/.github/workflows/remove-labels.yml @@ -1,12 +1,17 @@ name: Remove Outdated Labels + on: - pull_request_target: + pull_request: types: - closed issues: types: - closed +permissions: + issues: write + pull-requests: write + jobs: remove-merged-pr-labels: name: Remove merged pull request labels @@ -31,9 +36,10 @@ jobs: pending permission required won't add + remove-closed-pr-labels: name: Remove closed pull request labels - if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged) + if: github.event_name == 'pull_request' && (! github.event.pull_request.merged) runs-on: ubuntu-latest steps: - uses: actions/create-github-app-token@v1 @@ -48,6 +54,7 @@ jobs: in discussion pending assessing + remove-closed-issue-labels: name: Remove closed issue labels if: github.event.issue.state == 'closed'