ci(docs): skip pr-comment on fork PRs; bump actions to Node 24 - #22
Merged
Merged
Conversation
The pr-comment job posts a preview comment via github-script's
createComment, which is a write. On PRs opened from forks the
GITHUB_TOKEN is read-only, so the call fails with HTTP 403 "Resource not
accessible by integration" and the job goes red on every fork PR
(cosmetic — build and deploy are unaffected). Guard the job to run only
for same-repo PRs, where the token can write.
Also bump the Node 20 actions to their Node 24 majors to clear the
runner deprecation warnings ("Node 20 is being deprecated ... forced to
run on Node.js 24"): actions/checkout v4->v5, actions/setup-python
v5->v6, actions/github-script v7->v8.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DYcuURscruaF1yNVHJHW3C
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
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.
Fixes the recurring
pr-commentCI failure on fork PRs (e.g. the 1.36.0 docs release PR #21) and clears the Node 20 runner deprecation warnings.Root cause of the red: the
pr-commentjob posts a "Deploy Preview" comment viagithub.rest.issues.createComment— a write. On PRs opened from a fork, GitHub forcesGITHUB_TOKENto read-only (overriding the job'spermissions: pull-requests: write), so the call returns:The build and deploy jobs are unaffected — it's cosmetic, but it reddens every fork PR.
Changes
pr-commentwithgithub.event.pull_request.head.repo.full_name == github.repositoryso it runs only for same-repo PRs (where the token can write) and cleanly skips on fork PRs instead of failing.Node 20 is being deprecated … forced to run on Node.js 24warnings:actions/checkoutv4→v5,actions/setup-pythonv5→v6,actions/github-scriptv7→v8.Since the docs workflow is consumed as
docs-build-push.yml@main, this takes effect for all PRs once merged — re-running #21's checks after merge will showpr-commentas skipped, leaving it fully green.