Skip to content

Commit a30c9f1

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents e176da6 + 440c826 commit a30c9f1

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/all-contributors-auto-credit.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff 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

3040
on:
31-
pull_request:
41+
pull_request_target:
3242
types: [closed]
3343

3444
env:

0 commit comments

Comments
 (0)