Skip to content

Commit ff2058e

Browse files
authored
chore: Use pull_request_target for changelog preview (#5323)
## Summary Updates the changelog-preview workflow to use `pull_request_target` instead of `pull_request`. ## Why? This change is required for the changelog preview to work correctly with PRs from forks. With `pull_request`, the workflow runs with a read-only `GITHUB_TOKEN` which cannot post comments or create statuses on fork PRs. This aligns with the recommended usage in the [craft changelog-preview workflow](https://github.com/getsentry/craft/blob/master/.github/workflows/changelog-preview.yml). ## Security Note This change is safe because the changelog-preview workflow: - Downloads the Craft binary from releases (not from the PR) - Only reads git metadata and configuration - Does not execute any code from the PR
1 parent 5277c60 commit ff2058e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/changelog-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Changelog Preview
22
on:
3-
pull_request:
3+
pull_request_target:
44
types:
55
- opened
66
- synchronize

0 commit comments

Comments
 (0)