Skip to content

Commit 72c0b74

Browse files
docs(ci): stop asserting the fork-token theory the evidence never supported
The 403 was the permissions block. The original pull_request_target run carried the same pull-requests: read, so that trigger was never tested with the permission right and may well work too. The push trigger stays as a preference for taking the question off the table, not as a fix for something proven.
1 parent a8249e2 commit 72c0b74

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/first-contribution.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ name: First contribution
33
# Thanks someone the first time a PR of theirs is merged. On merge rather than on open: at
44
# that point they've actually given something, so it reads as thanks instead of a pitch.
55
#
6-
# On `push` to main rather than `pull_request_target: closed`, which is the obvious trigger
7-
# and does not work. A workflow run triggered by a fork's pull request gets a read-only
8-
# GITHUB_TOKEN regardless of the repository's Workflow permissions setting, so the POST came
9-
# back 403 on every real first contribution — silently, because the run itself was green.
10-
# Granting it means enabling "send write tokens to workflows from fork pull requests", which
11-
# hands a write token to every fork-triggered run in the repository. That is a bad trade for
12-
# a thank-you note. A push to main is not fork-triggered, so its token honours the
13-
# permissions block below.
6+
# On `push` to main rather than `pull_request_target: closed`. The 403s that prompted the
7+
# change turned out to be the permissions block below, not the trigger — so treat this as a
8+
# preference, not a fix: a push to main is plainly not fork-triggered, which takes the whole
9+
# question of what token a fork PR gets off the table. `pull_request_target` would very
10+
# possibly work now too; it was never tested with the permission right, because the
11+
# permission was wrong the entire time.
12+
#
13+
# Every run before that fix was green. A 403 here only raises a ::warning::, and nobody reads
14+
# a warning on a green run — which is why this went unnoticed through several merges.
1415
#
1516
# Note on the check: author_association is NOT usable here either. Merging a PR promotes its
1617
# author from FIRST_TIME_CONTRIBUTOR to CONTRIBUTOR before the event is delivered, so a

0 commit comments

Comments
 (0)