Skip to content

Commit 959024b

Browse files
authored
ci: scope down GitHub Token permissions (#176)
* ci: scope down permissions for auto_assign.yml * ci: scope down permissions for label_pr_on_title.yml * ci: scope down permissions for on_merged_pr.yml * ci: scope down permissions for on_opened_pr.yml
1 parent 49ac37c commit 959024b

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

.github/workflows/auto_assign.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
pull_request:
44
types: [opened, ready_for_review]
55

6+
permissions:
7+
pull-requests: write
8+
69
jobs:
710
add-reviews:
811
runs-on: ubuntu-latest

.github/workflows/label_pr_on_title.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
types:
77
- completed
88

9+
permissions:
10+
pull-requests: write
11+
912
jobs:
1013
get_pr_details:
1114
# Guardrails to only ever run if PR recording workflow was indeed

.github/workflows/on_merged_pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
types:
77
- completed
88

9+
permissions:
10+
issues: write
11+
912
jobs:
1013
get_pr_details:
1114
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'

.github/workflows/on_opened_pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
types:
77
- completed
88

9+
permissions:
10+
pull-requests: write
11+
912
jobs:
1013
get_pr_details:
1114
if: ${{ github.event.workflow_run.conclusion == 'success' }}

0 commit comments

Comments
 (0)