Skip to content

Commit 990ff44

Browse files
committed
Give privileges to request-reviewers workflow
Signed-off-by: Tero Saarni <[email protected]>
1 parent 867d4c7 commit 990ff44

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
on:
2-
pull_request:
2+
# Note: Using 'pull_request_target' to ensure the token has write permissions for modifying pull requests
3+
pull_request_target:
34
types: [opened, reopened, ready_for_review]
45

56
permissions:
@@ -10,9 +11,9 @@ jobs:
1011
if: github.repository == 'projectcontour/helm-charts'
1112
runs-on: ubuntu-latest
1213
steps:
13-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
14+
# Security note: Avoid checking out the pull request's code to prevent running untrusted code with 'pull_request_target'.
1415
- name: Request reviewers
1516
env:
1617
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1718
run: |
18-
gh pr edit ${{ github.event.pull_request.number }} --add-reviewer contour-helm-chart-maintainers
19+
gh pr edit ${{ github.event.pull_request.number }} --repo "${{ github.repository }}" --add-reviewer contour-helm-chart-maintainers

0 commit comments

Comments
 (0)