Skip to content

docs: move the examples and docs build onto Node 24 - #28

Merged
mmcky merged 3 commits into
mainfrom
maint/node24-examples
Sep 18, 2026
Merged

mmcky merged 3 commits into
mainfrom
maint/node24-examples

Conversation

@mmcky

@mmcky mmcky commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part of QuantEcon/workspace-lectures#68. An audit of main (df55c87, still the head when this branch was cut) found Node 20 still pinned in what consumers copy, the two example workflows and the docs/user/* usage snippets, and the docs build still on Node 22. action.yml on main is already clean: it nests actions/checkout@v5 and astral-sh/setup-uv@v7, both runs.using: node24. So this PR moves only the examples, the usage docs and the docs build. No code changes. After Copilot's review it also corrects two things in the examples that predate it: the permissions they grant, and when they trigger (see below).

Merge timing. @v0.8 does not resolve yet. The repository has no v0.8 or v0.8.0 tag; the newest is v0.7.2, with the floating v0.7 on the same commit. This PR should merge right before the v0.8.0 release, and that release needs to push the floating v0.8 tag (step 9 of the release process in .github/copilot-instructions.md). Merging also redeploys the docs site, because docs.yml runs on pushes to main that touch docs/**, so the site shows @v0.8 from the moment this merges.

What changed

I read each new pin's action.yml at the tag before pinning it:

Action Where Before After runs.using at the new tag
actions/github-script both examples (3 steps) @v7 (node20) @v9 node24
QuantEcon/action-style-guide both examples; getting-started.md (2), configuration.md (1), github-app-setup.md (2) @v0.7 @v0.8 composite; main nests only node24 actions (above)
actions/create-github-app-token github-app-setup.md @v1 (node20) @v3 node24
actions/setup-node docs.yml @v6 (node24) @v7 node24

Also:

  • docs.yml: node-version: '22' becomes '24' for the npx mystmd build.
  • docs/user/cli.md: the "Specific version" pip example moves from @v0.7 to @v0.8, so every usage pin names the same release line as the examples.
  • CHANGELOG.md: the earlier [Unreleased] entries that said @v0.7 and setup-node@v6 on Node 22 are corrected in place (391feb9), since none of it is released, and a new entry records the Node 24 moves. That entry also says what the new pins ask of consumers: a self-hosted runner needs v2.327.1 or later, and create-github-app-token v3 dropped its own proxy handling, so behind HTTP_PROXY or HTTPS_PROXY the step also needs NODE_USE_ENV_PROXY=1 (both from its v3.0.0 breaking changes).

Notes

  • Why @v0.7 has to move. The v0.7 tag's action.yml nests actions/checkout@v4 and actions/setup-python@v5, and both declare runs.using: node20 at those tags.
  • github-script v9, not v8. v9 matches ci: move GitHub Actions to their Node 24 majors action-link-checker#9, merged today. v8.0.0's only functional change is the move to Node 24, which needs runner v2.327.1 or later. v9.0.0 has two breaking changes: require('@actions/github') fails, and redeclaring getOctokit with const or let is a SyntaxError. The three example scripts do neither. They use only github.rest.reactions.createForIssueComment, github.rest.issues.createComment, github.rest.issues.create, context.repo and context.payload. v9's src/main.ts still injects github and context as v7 does, and adds getOctokit.
  • create-github-app-token v3. v2 still declares node20, so v3 is its first node24 major. v3.1.0 deprecated app-id in favour of client-id. v3 still reads app-id as a fallback (core.getInput("client-id") || core.getInput("app-id") in main.js), so the snippet works unchanged but will log a deprecation warning. Moving the page to client-id changes which secret users store, so I have left that for a separate docs change.
  • setup-node v7. v6 already ran on node24. v7 is the current major (v7.0.0, 2026-07-14) and matches ci: move GitHub Actions to their Node 24 majors lecture-wasm#82. Its release notes list an ESM migration and new cache outputs. docs.yml passes only node-version.

Also corrected, from review (812a51d)

Copilot's review raised three problems in the lines around these pins. All three predate this PR, and all three are in what consumers copy, so they are corrected here:

Where Problem Now
examples/style-guide-comment.yml The job granted issues: read, but its github-script steps react to the triggering comment and post the result as an issue comment, and both need issues: write. On a plain issue both calls were refused with 403; they only worked on pull requests, through pull-requests: write. issues: write
examples/style-guide-weekly.yml No issues permission for its issues.create step (with labels), so the step was refused with 403. issues: write
docs/user/getting-started.md snippet It listened for issues events but tested only github.event.comment.body, so every issue event ran as skipped. QuantEcon/lecture-python-advanced.myst's style-guide.yml is this snippet verbatim. The comment is tested on issue_comment events and the issue on issues events
examples/style-guide-comment.yml trigger It tested github.event.issue.body on every event. On a comment event that is the parent issue, so once an issue mentioned @qe-style-checker, every later comment on it re-ran the check. Its reaction step also read context.payload.comment.id, which an issues event does not carry, so the issue-body trigger it advertises failed before the checker ran. Each test is scoped to its own event, as in the snippet, and the reaction step is skipped on issues events

CHANGELOG.md records both under a ### Fixed heading in [Unreleased].

Deliberately left alone

  • docs.yml's actions/checkout@v5, upload-pages-artifact@v5 and deploy-pages@v5 are already on node24 or composite.
  • Version numbers that change in the release commit are untouched: the README badge (0.7.2), __version__, and the git tag -f v0.7 example in docs/developer/contributing.md.
  • Historical references in CHANGELOG.md, TECHNICAL-REVIEW.md and PLAN.md are records and stay as they are.

Test plan

  • YAML parses (PyYAML): both examples, docs.yml, and every fenced yaml block in the three changed docs pages. actionlint 1.7.12 is clean on the three workflow files. At 812a51d it is also clean on both examples and on the Getting Started snippet extracted from the page.
  • Docs build on Node 24, locally. With Node v24.21.0 and mystmd v1.10.1 from npm (isolated npm prefix), BASE_URL=/action-style-guide npx -y mystmd build --html printed "Built 13 pages for project" and exited 0. The built pages show @v0.8 and create-github-app-token@v3.
  • docs.yml on Actions: not run from this branch. It triggers only on pushes to main and on workflow_dispatch, and a dispatch would also start the deploy job. The github-pages environment admits only main, so that job would be refused, but I did not attempt a deploy from a branch. The merge run, which deploys, is the first real proof.
  • CI on this PR: Lint and Test Python 3.11/3.12/3.13 passed at 812a51d (run 35344850872). It does not exercise the examples or docs.yml.
  • The example workflows are copied by consumers, so no CI here runs them. @v0.8 resolves only after the release.

🤖 Generated with Claude Code

- examples: actions/github-script v7 -> v9 (node24); the action pin
  moves @v0.7 -> @v0.8, since the v0.7 tag still nests
  actions/checkout@v4 and actions/setup-python@v5 (node20)
- docs/user: usage pins @v0.7 -> @v0.8, matching the examples;
  actions/create-github-app-token v1 -> v3 (first node24 major)
- docs.yml: actions/setup-node v6 -> v7, node-version '22' -> '24'
- CHANGELOG: two entries under [Unreleased]

@v0.8 resolves only once the v0.8 tag is pushed, so this should merge
right before the v0.8.0 release.

Part of QuantEcon/workspace-lectures#68.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 18, 2026 12:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated example workflows still have insufficient GitHub token permissions for the actions/github-script steps (issue/comment creation), which will cause runtime failures.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR updates the repository’s copied/consumer-facing materials (example workflows, user docs snippets, and the docs build workflow) to align with GitHub’s Node 24 Actions runtime by bumping referenced action versions and the docs build Node version.

Changes:

  • Updated example workflows and docs snippets to use QuantEcon/action-style-guide@v0.8 and actions/github-script@v9 (Node 24).
  • Updated GitHub App setup docs to use actions/create-github-app-token@v3 (Node 24).
  • Updated docs build workflow to use Node 24 (actions/setup-node@v7, node-version: '24') and recorded the changes in the changelog.
File summaries
File Description
examples/style-guide-weekly.yml Bumps the action and github-script versions for Node 24 compatibility.
examples/style-guide-comment.yml Bumps the action and github-script versions for Node 24 compatibility.
docs/user/github-app-setup.md Updates the recommended GitHub App token action major version.
docs/user/getting-started.md Updates workflow snippet pins to the new action release line.
docs/user/configuration.md Updates the bulk-mode snippet pin to @v0.8.
docs/user/cli.md Updates the “specific version” install example to @v0.8.
CHANGELOG.md Adds unreleased entries documenting the Node 24 pin moves for examples/docs and docs build.
.github/workflows/docs.yml Moves the docs build to Node 24 and updates setup-node major.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/user/getting-started.md
Comment thread examples/style-guide-comment.yml
Comment thread examples/style-guide-weekly.yml
mmcky and others added 2 commits September 18, 2026 22:28
…the trigger to its event

The comment example granted issues: read, but its github-script steps
react to the triggering comment and post the result as an issue
comment, both of which need issues: write; the weekly example granted
no issues permission for its issues.create step. Both now grant
issues: write.

The Getting Started snippet listened for issues events but tested only
the comment body, so issue events always ran as skipped. The example
tested github.event.issue.body on every event, which on a comment event
is the parent issue, so once an issue mentioned the trigger every later
comment re-ran the check; its reaction step also needed a comment id
that an issues event does not carry. Both now test the comment on
issue_comment events and the issue on issues events, and the example
skips the reaction on issues events.

Raised by Copilot's review of #28.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…hey replace

The earlier [Unreleased] bullets still said @v0.7 and setup-node v6 on
Node 22, with later bullets superseding them. Since none of it is
released, correct them in place, and note what the new pins ask of
consumers: runner v2.327.1+ on self-hosted runners, and
NODE_USE_ENV_PROXY=1 for create-github-app-token v3 behind a proxy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mmcky
mmcky merged commit 22d0a1b into main Sep 18, 2026
4 checks passed
@mmcky
mmcky deleted the maint/node24-examples branch September 19, 2026 04: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.

2 participants