pr-states: fix fork-PR token + add run-ci label awareness - #25392
Merged
hnyls2002 merged 7 commits intoMay 15, 2026
Merged
Conversation
hnyls2002
requested review from
Fridge003,
Kangyan-Zhou,
bingxche,
ispobock and
merrymercy
as code owners
May 15, 2026 10:39
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
pull_request_target so fork PRs get write token
pull_request_target so fork PRs get write token
Collaborator
Author
|
/tag-and-rerun-ci |
Fridge003
pushed a commit
that referenced
this pull request
May 16, 2026
Chronostasys
pushed a commit
to MindLab-Research/sglang
that referenced
this pull request
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pr-states.ymltrigger frompull_requesttopull_request_targetso fork PRs receive a write-enabledGITHUB_TOKENand the awareness comment update succeedsrun-cilabel (parallel to the existingrun-ci-extrawarning)slash_command_handler.py(the deprecation message posted right below already states the rationale)Background — fork PR token
pull_requestevents from a fork, GitHub forcesGITHUB_TOKENto be read-only — this is a platform-level security policy that ignores thepermissions: pull-requests: writedeclaration in the workflow filepr-states / update-pr-bodycallsPATCH /repos/.../pulls/<n>which fails with403 Resource not accessible by integrationon every fork PR (reproduced on this PR's first run before the fix: Run 25913505322)pr-states / update-pr-bodycheck in their checks list, which is confusing for external contributorsFix —
pull_request_targetpull_request_targetruns in the context of the base branch and grants the workflow a write-enabled token, so the API PATCH succeeds for both fork and non-fork PRspull_request_targetsupply-chain concern (running untrusted fork code with a write token) does not applyrun-cilabel awarenessrun-cilabel,pr-test.yml's gate (pr-gate.yml:57) fails and all downstream stages skip — but the awareness block previously linked to the (effectively empty) run, which was misleadingrun-ci-extrapattern: show:x: **Missing run-ci label**instead of a stale linkVerification
pull_request_targetswitch cannot be observed on this PR's CI: GitHub runs the workflow file from the base branch, so until this is merged the fork PR still hits 403. The fix is reviewable as code; merge will activate it for the next fork PRFollows up on #25387.