Skip to content

Commit 00983bc

Browse files
committed
ci: Fix comments permission
Use pull_request_target for elevated permissions. Signed-off-by: Chaitanya Tata <[email protected]>
1 parent f2c46d4 commit 00983bc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/module-monitor.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Module Monitor
22
on:
3-
pull_request:
3+
pull_request_target:
44
paths:
55
- 'zephyr/module.yml'
66

@@ -19,7 +19,6 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121
persist-credentials: false
22-
ref: ${{ github.event.pull_request.head.sha }}
2322

2423
- name: Fetch PR head
2524
run: |
@@ -44,8 +43,8 @@ jobs:
4443
id: changes
4544
env:
4645
GITHUB_EVENT_NAME: ${{ github.event_name }}
47-
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha || '' }}
48-
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha || '' }}
46+
GITHUB_BASE_SHA: ${{ github.event.pull_request_target.base.sha || '' }}
47+
GITHUB_HEAD_SHA: ${{ github.event.pull_request_target.head.sha || '' }}
4948
run: |
5049
# Compare with base branch for pull requests
5150
BASE_REF="$GITHUB_BASE_SHA"

0 commit comments

Comments
 (0)