Skip to content

ci(docs): skip pr-comment on fork PRs; bump actions to Node 24 - #22

Merged
andypost merged 1 commit into
freeunitorg:mainfrom
andypost:ci/docs-node24-fork-guard
Jul 17, 2026
Merged

ci(docs): skip pr-comment on fork PRs; bump actions to Node 24#22
andypost merged 1 commit into
freeunitorg:mainfrom
andypost:ci/docs-node24-fork-guard

Conversation

@andypost

Copy link
Copy Markdown

Fixes the recurring pr-comment CI 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-comment job posts a "Deploy Preview" comment via github.rest.issues.createComment — a write. On PRs opened from a fork, GitHub forces GITHUB_TOKEN to read-only (overriding the job's permissions: pull-requests: write), so the call returns:

RequestError [HttpError]: Resource not accessible by integration  (status: 403)

The build and deploy jobs are unaffected — it's cosmetic, but it reddens every fork PR.

Changes

  • Guard pr-comment with github.event.pull_request.head.repo.full_name == github.repository so it runs only for same-repo PRs (where the token can write) and cleanly skips on fork PRs instead of failing.
  • Bump the Node-20 actions to their Node-24 majors to clear the Node 20 is being deprecated … forced to run on Node.js 24 warnings: actions/checkout v4→v5, actions/setup-python v5→v6, actions/github-script v7→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 show pr-comment as skipped, leaving it fully green.

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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@andypost
andypost merged commit 09ef236 into freeunitorg:main Jul 17, 2026
6 of 8 checks passed
@andypost
andypost deleted the ci/docs-node24-fork-guard branch July 17, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant