Skip to content

Commit ca98396

Browse files
committed
Use pull_request_target for write permissions
1 parent 3733049 commit ca98396

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/pr-merged.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Merged
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [closed]
66
branches:
77
- next
@@ -21,6 +21,8 @@ jobs:
2121
steps:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
24+
with:
25+
ref: "${{ github.event.pull_request.head.sha }}"
2426

2527
- name: Install pnpm
2628
uses: pnpm/action-setup@v4

.github/workflows/pr-updated.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Updated
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
branches:
66
- next
77

@@ -21,6 +21,8 @@ jobs:
2121
steps:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
24+
with:
25+
ref: "${{ github.event.pull_request.head.sha }}"
2426

2527
- name: Install pnpm
2628
uses: pnpm/action-setup@v4

0 commit comments

Comments
 (0)