Skip to content

Commit a7f67a2

Browse files
committed
fix(pr-labeler): use pull_request_target to fix 403 on fork PRs
pull_request runs in the fork context, where GITHUB_TOKEN is read-only even with write permissions declared. pull_request_target always runs in the base repo context so the token can write labels and comments. Safe here because we never check out fork code.
1 parent 3861086 commit a7f67a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.github/workflows/pr-labeler.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: PR Labeler
44
# prefix (conventional-commits style). No secrets or external services needed.
55

66
on:
7-
pull_request:
7+
pull_request_target:
88
types: [opened, edited, synchronize]
99

1010
concurrency:

0 commit comments

Comments
 (0)