Skip to content

Commit 18040d6

Browse files
committed
fix(ci): use pull_request_target for fork PR label permissions
The pull_request event gives fork PRs a read-only GITHUB_TOKEN, causing the label step to fail with 403. pull_request_target runs in the base repo context with the declared write permissions.
1 parent 070190f commit 18040d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/pr-labels.yml

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

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened, synchronize, reopened]
66

77
permissions:

0 commit comments

Comments
 (0)