Repository navigation
feat(ci): forward wp-ci inputs to leaves and resolve Node from .nvmrc - #47
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 4
Open (9)
Same issue asci-lint-js.yml: when changed stylesheets are present, this calls `npm run lint:css… · New Same issue asci-lint-js.yml: when changed stylesheets are present, this calls `npm run lint:css… · New When linting only changed files, this appends file paths as arguments toLINT_COMMAND, but the… · New When linting only changed files, this appends file paths as arguments toLINT_COMMAND, but the… · Newactions/setup-nodedocumentsnode-version-fileas a path resolved from the workspace/repo.… · Newactions/setup-nodedocumentsnode-version-fileas a path resolved from the workspace/repo.… · Newactions/setup-nodedocumentsnode-version-fileas a path resolved from the workspace/repo.… · Newactions/setup-nodedocumentsnode-version-fileas a path resolved from the workspace/repo.… · New The same multi-line ‘Resolve Node.js version’ step is duplicated across several workflows in this… · New
What changed in this PR
This PR enhances the reusable CI/CD workflows so callers can override leaf-job settings (notably Node/PHP versions and command inputs) while making Node resolution respect project .nvmrc files instead of always forcing Node 22.
Changes:
- Forward additional inputs from
wp-ci.ymlinto leaf workflows (Node/PHP versions, Composer flags, per-job*-commandinputs). - Add consistent Node resolution logic across “leaf” workflows:
node-version→.nvmrcinworking-dir→ repo root.nvmrc→ Node 22. - Update docs (README/AGENTS) to describe the forwarding behavior and GitHub’s empty-string default behavior.
| File | Description |
|---|---|
| README.md | Documents Node resolution and forwarded leaf inputs. |
| AGENTS.md | Captures conventions for forwarding inputs and Node selection behavior. |
| .github/workflows/wp-ci.yml | Adds and forwards many new inputs to leaf workflows. |
| .github/workflows/ci-test-php.yml | Uses .nvmrc-aware Node resolution and step-level string defaults. |
| .github/workflows/ci-test-js.yml | Uses .nvmrc-aware Node resolution and step-level string defaults. |
| .github/workflows/ci-test-build-artifact.yml | Uses .nvmrc-aware Node resolution; step-level defaults for PHP version. |
| .github/workflows/ci-test-a11y.yml | Uses .nvmrc-aware Node resolution and step-level command defaults. |
| .github/workflows/ci-lint-php.yml | Moves string defaults to runtime fallbacks (PHP/Composer/PHPCS/PHPStan). |
| .github/workflows/ci-lint-js.yml | Adds .nvmrc Node resolution; changes “lint changed files” behavior. |
| .github/workflows/ci-lint-css.yml | Adds .nvmrc Node resolution; changes “lint changed files” behavior. |
| .github/workflows/ci-build.yml | Adds .nvmrc Node resolution; moves PHP/Composer defaults to runtime fallbacks. |
| .github/workflows/cd-built-branch.yml | Adds per-target .nvmrc support via node-version-file in the matrix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| node-version: ${{ matrix.node-version }} | ||
| node-version-file: ${{ matrix.node-version-file }} |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (7)
The.nvmrcexistence check and the emitted path can disagree: the step tests[ -s .nvmrc ]in… · New The Node resolution block is duplicated across multiple workflows (lint/test/build/a11y/artifact).… · New The same multi-line ‘Resolve Node.js version’ step is duplicated across several workflows in this…actions/setup-nodedocumentsnode-version-fileas a path resolved from the workspace/repo.…actions/setup-nodedocumentsnode-version-fileas a path resolved from the workspace/repo.…actions/setup-nodedocumentsnode-version-fileas a path resolved from the workspace/repo.…actions/setup-nodedocumentsnode-version-fileas a path resolved from the workspace/repo.…
Resolved since last review (4)
When linting only changed files, this appends file paths as arguments toLINT_COMMAND, but the… When linting only changed files, this appends file paths as arguments toLINT_COMMAND, but the… Same issue asci-lint-js.yml: when changed stylesheets are present, this calls `npm run lint:css… Same issue asci-lint-js.yml: when changed stylesheets are present, this calls `npm run lint:css…
engine-strict turned the engines floor into a hard install failure. Node here only runs dev tooling (build, lint, tests, wp-env), so CVE-2026-111497 exposure is minimal, and the security ask is the .nvmrc and engines bump, not enforcement. engine-strict also failed CI, since the shared wp-ci@v1 installs the runner-cached Node 22.23.3 instead of reading .nvmrc (rtCamp/wp-shared-workflows#47). Affected releases still get an npm EBADENGINE warning. This reverts commit 940b514. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
engine-strict turned the engines floor into a hard install failure. Node here only runs dev tooling (build, lint, tests, wp-env), so CVE-2026-111497 exposure is minimal, and the security ask is the .nvmrc and engines bump, not enforcement. engine-strict also failed CI, since the shared wp-ci@v1 installs the runner-cached Node 22.23.3 instead of reading .nvmrc (rtCamp/wp-shared-workflows#47). Affected releases still get an npm EBADENGINE warning. This reverts commit 3abb8f4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d5ac592 to
427f836
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Keep lint-command for whole-project runs. Allow callers to opt into changed-file linting with lint-files-command. Run whole-project linting for package changes, lint configs and deleted files.
aca2bd0 to
e4f7340
Compare
…#47) * feat(ci): forward inputs through wp-ci, resolve .nvmrc * chore(ci): drop redundant trailing-slash strip in cd-built-branch * fix(ci): check .nvmrc at the path setup-node reads * feat(ci): add changed-file lint commands Keep lint-command for whole-project runs. Allow callers to opt into changed-file linting with lint-files-command. Run whole-project linting for package changes, lint configs and deleted files.
Brings in rtCamp#44, rtCamp#46, rtCamp#47, rtCamp#48 and rtCamp#49. AGENTS.md keeps this branch's rule that release-please owns CHANGELOG.md, the manifest and v* tags, and takes rtCamp#46's wording for cd-github-release.yml, which is consumer guidance. Drops the hand-written "## Unreleased" section rtCamp#47 added to CHANGELOG.md: release-please inserts each release above the first version heading, so that section would stay stranded above every release. The first release PR lists rtCamp#46 to rtCamp#49 from their titles, and rtCamp#47's fuller notes can go into that PR before it merges.
* fix(deps): require patched Node for CVE-2026-111497 Node.js 22.23.4, 24.22.1 and 26.12.1 fix CVE-2026-111497, a high-severity out-of-bounds write in the Brotli decoder. Raise .nvmrc (which the shared CI workflows read) and the engines floor so earlier, affected releases warn on install. Ref: https://nodejs.org/en/blog/vulnerability/october-2026-security-releases * fix(deps): refuse installs on Node below the engines floor npm treats engines as advisory, so an affected Node only got an EBADENGINE warning. engine-strict makes npm ci / npm i (including Composer's npm i hook) fail instead. Patched 22.23.4 and 24.22.1 still install cleanly. * revert(deps): drop engine-strict, keep engines advisory engine-strict turned the engines floor into a hard install failure. Node here only runs dev tooling (build, lint, tests, wp-env), so CVE-2026-111497 exposure is minimal, and the security ask is the .nvmrc and engines bump, not enforcement. engine-strict also failed CI, since the shared wp-ci@v1 installs the runner-cached Node 22.23.3 instead of reading .nvmrc (rtCamp/wp-shared-workflows#47). Affected releases still get an npm EBADENGINE warning. This reverts commit 940b514. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: name each patched Node line in the setup requirements "22.23.4 or later" read as if any newer Node were fine, but 24.21.0 is newer and still affected, and engines rejects it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(deps): require patched Node for CVE-2026-111497 Node.js 22.23.4, 24.22.1 and 26.12.1 fix CVE-2026-111497, a high-severity out-of-bounds write in the Brotli decoder. Raise .nvmrc (which the shared CI workflows read) and the engines floor so earlier, affected releases warn on install. Ref: https://nodejs.org/en/blog/vulnerability/october-2026-security-releases * fix(deps): refuse installs on Node below the engines floor npm treats engines as advisory, so an affected Node only got an EBADENGINE warning. engine-strict makes npm ci / npm i (including Composer's npm i hook) fail instead. Patched 22.23.4 and 24.22.1 still install cleanly. * revert(deps): drop engine-strict, keep engines advisory engine-strict turned the engines floor into a hard install failure. Node here only runs dev tooling (build, lint, tests, wp-env), so CVE-2026-111497 exposure is minimal, and the security ask is the .nvmrc and engines bump, not enforcement. engine-strict also failed CI, since the shared wp-ci@v1 installs the runner-cached Node 22.23.3 instead of reading .nvmrc (rtCamp/wp-shared-workflows#47). Affected releases still get an npm EBADENGINE warning. This reverts commit 3abb8f4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: name each patched Node line in the setup requirements "22.23.4 or later" read as if any newer Node were fine, but 24.21.0 is newer and still affected, and engines rejects it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>


What this PR does
Lets
wp-ci.ymlcallers configure every job it fans out to (Node/PHP versions, Composer flags, the*-commandinputs), and makes every leaf honor.nvmrcinstead of forcing Node 22.Closes
N/A
Changes
How I verified
Acceptance criteria
Code quality
Housekeeping
CHANGELOG.mdentry under the current version headingexamples/<workflow>.ymladded or updated to match any input changeyamllint,actionlintandbin/check-workflows.shpass locally