From e17303ea883cda599c4f83b5508784c198f4d0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Wed, 21 Aug 2024 17:22:07 -0700 Subject: [PATCH] fix: permissions issue in pr labeler (#16245) --- .github/workflows/pr-review.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml index 29412eaaf1..7f64220c67 100644 --- a/.github/workflows/pr-review.yml +++ b/.github/workflows/pr-review.yml @@ -14,7 +14,15 @@ jobs: steps: - name: Label PR as ready for E2E if: github.event.review.state == 'approved' - uses: actions-ecosystem/action-add-labels@v1 + uses: actions/github-script@v4 with: + script: | + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: process.env.labels.split(', '), + }) + env: github_token: ${{ secrets.READY_FOR_E2E_PAT }} labels: 'ready-for-e2e'