File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,17 @@ name: '🔧 Infra · 🤖 All Contributors Auto-credit on Merge'
1818# a "please clarify" comment if either is unknown
1919#
2020# Triggers:
21- # - pull_request: closed (and merged == true)
21+ # - pull_request_target: closed (and merged == true)
22+ #
23+ # Why pull_request_target (not pull_request):
24+ # For PRs from forks, the GITHUB_TOKEN on `pull_request` is read-only — the
25+ # declared `pull-requests: write` in this workflow is silently ignored, and
26+ # the comment POST returns 403. `pull_request_target` runs in the base-repo
27+ # context with the full token, which is exactly what we need.
28+ #
29+ # This is safe here: we never check out fork code (sparse checkout pulls
30+ # from dev only) and the LLM prompt only ingests title/body/file-paths as
31+ # data — there is no shell eval of fork-controlled input.
2232#
2333# Related:
2434# - all-contributors-add.yml — fires on the comment we post
@@ -28,7 +38,7 @@ name: '🔧 Infra · 🤖 All Contributors Auto-credit on Merge'
2838# =============================================================================
2939
3040on :
31- pull_request :
41+ pull_request_target :
3242 types : [closed]
3343
3444env :
You can’t perform that action at this time.
0 commit comments