Skip to content

Commit 2d6865d

Browse files
authored
Merge pull request #9739 from reasonerjt/update-actions-permissions
Set permissions to the actions
2 parents 1160ae2 + a96a73d commit 2d6865d

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/auto_assign_prs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
pull_request_target:
88
types: [opened, reopened, ready_for_review]
99

10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
1014
jobs:
1115
# Automatically assigns reviewers and owner
1216
add-reviews:
@@ -16,4 +20,3 @@ jobs:
1620
uses: kentaro-m/auto-assign-action@v2.0.0
1721
with:
1822
configuration-path: ".github/auto-assignees.yml"
19-
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/auto_label_prs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ on:
88
pull_request_target:
99
types: [opened, reopened, synchronize, ready_for_review]
1010

11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
1115
jobs:
1216
# Automatically labels PRs based on file globs in the change.
1317
triage:
1418
runs-on: ubuntu-latest
1519
steps:
1620
- uses: actions/labeler@v5
1721
with:
18-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1922
configuration-path: .github/labeler.yml

.github/workflows/auto_request_review.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
pull_request_target:
66
types: [opened, ready_for_review, reopened]
77

8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
812
jobs:
913
auto-request-review:
1014
name: Auto Request Review
@@ -13,5 +17,4 @@ jobs:
1317
- name: Request a PR review based on files types/paths, and/or groups the author belongs to
1418
uses: necojackarc/auto-request-review@v0.13.0
1519
with:
16-
token: ${{ secrets.GITHUB_TOKEN }}
1720
config: .github/auto-assignees.yml

0 commit comments

Comments
 (0)