Skip to content

Commit 6bcf1bd

Browse files
committed
chore(repo): limit github token permissions in applicable runs
1 parent 81090ce commit 6bcf1bd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/pr-title-validation.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: PR Title Validation
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types: [opened, edited, synchronize, reopened]
6-
branches: [master]
6+
7+
permissions: read-all
78

89
jobs:
910
validate-pr-title:
@@ -13,8 +14,8 @@ jobs:
1314
- name: Checkout code
1415
uses: actions/checkout@v4
1516
with:
16-
# For pull_request_target, we need to checkout the base branch
17-
ref: ${{ github.event.pull_request.base.ref }}
17+
# Ensure's validate-pr-title.js is the copy from master
18+
ref: master
1819

1920
- name: Setup Node.js
2021
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)