Repository navigation
Commit 18d7cee
authored
chore: use pull_request_target for auto-labeler on fork PRs (#488)
fix: use pull_request_target for auto-labeler on fork PRs
When a PR is opened from a fork repository, the GITHUB_TOKEN in
pull_request events only has read permissions, preventing the
autolabeler from adding labels. Using pull_request_target runs
the workflow in the context of the base repository with write
permissions, which is safe since the autolabeler only reads PR
metadata and adds labels without checking out any code.
Fixes auto-labeler failing on PR #487 from a fork.1 parent cb0c44f commit 18d7cee
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments