Skip to content

feat(ci): forward wp-ci inputs to leaves and resolve Node from .nvmrc - #47

Merged
Adi-ty merged 4 commits into
mainfrom
feat/wp-ci-input-passthrough
Nov 4, 2026
Merged

Adi-ty merged 4 commits into
mainfrom
feat/wp-ci-input-passthrough

Conversation

@Adi-ty

@Adi-ty Adi-ty commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

Lets wp-ci.yml callers configure every job it fans out to (Node/PHP versions, Composer flags, the *-command inputs), and makes every leaf honor .nvmrc instead of forcing Node 22.

Closes

N/A

Changes

  • wp-ci.yml now forwards 16 inputs to the leaves: node-version, php-version, composer-flags, build-composer-flags, install-composer-deps, build-command, lint-css-command, lint-js-command, phpcs-command, phpstan-command, test-js-command, test-js-cache, test-php-command, a11y-command.
  • Leaves resolve Node from node-version, else .nvmrc in working-dir, else the repo root's .nvmrc, else 22.
  • Same resolution added to cd-built-branch.yml, per target.
  • String input defaults moved from the workflow_call block to a fallback at the step, because GitHub forwards an empty string instead of the callee's default.
  • Existing callers behave the same; no input renamed or removed, so it is safe for consumers pinned at v1.
  • ci-detect-changes and version-monitor keep a fixed Node version; they run wp-tooling, not project code.
  • Documented both conventions in AGENTS.md and README.md.

How I verified

  • yamllint, actionlint and bin/check-workflows.sh pass.

Acceptance criteria

Code quality

  • Lint — zero errors
  • Static analysis — zero errors
  • Tests pass

Housekeeping

  • CHANGELOG.md entry under the current version heading
  • examples/<workflow>.yml added or updated to match any input change
  • yamllint, actionlint and bin/check-workflows.sh pass locally

@Adi-ty
Adi-ty marked this pull request as ready for review October 5, 2026 17:05
@Adi-ty
Adi-ty requested review from AnuragVasanwala and aryanjasala and a balanced review from Copilot October 5, 2026 17:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 High severity · 5 Medium severity

Open (9)
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.yml into leaf workflows (Node/PHP versions, Composer flags, per-job *-command inputs).
  • Add consistent Node resolution logic across “leaf” workflows: node-version → .nvmrc in working-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.

Comment thread .github/workflows/ci-lint-css.yml Resolved
Comment thread .github/workflows/ci-lint-css.yml Resolved
Comment thread .github/workflows/ci-lint-js.yml Resolved
Comment thread .github/workflows/ci-lint-js.yml Resolved
Comment thread .github/workflows/cd-built-branch.yml Resolved
Comment thread .github/workflows/cd-built-branch.yml Resolved
Comment thread .github/workflows/cd-built-branch.yml Resolved
Comment on lines 341 to +342
node-version: ${{ matrix.node-version }}
node-version-file: ${{ matrix.node-version-file }}
Comment thread .github/workflows/ci-test-js.yml Resolved
Copilot AI balanced review requested due to automatic review settings October 6, 2026 05:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread .github/workflows/ci-test-js.yml Resolved
Comment thread .github/workflows/ci-build.yml Resolved
@Adi-ty
Adi-ty added this pull request to stack #50 October 8, 2026 05:46
@Adi-ty
Adi-ty requested review from justlevine and a balanced review from Copilot and removed request for Copilot October 23, 2026 13:42
Adi-ty added a commit to rtCamp/plugin-elementary that referenced this pull request Oct 23, 2026
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>
Adi-ty added a commit to rtCamp/theme-elementary that referenced this pull request Oct 23, 2026
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>
Comment thread .github/workflows/ci-lint-js.yml Resolved
@Adi-ty
Adi-ty force-pushed the feat/wp-ci-input-passthrough branch from d5ac592 to 427f836 Compare November 2, 2026 17:24
Copilot AI balanced review requested due to automatic review settings November 2, 2026 17:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copilot AI balanced review requested due to automatic review settings November 3, 2026 14:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.
@Adi-ty
Adi-ty force-pushed the feat/wp-ci-input-passthrough branch from aca2bd0 to e4f7340 Compare November 4, 2026 06:15
@Adi-ty
Adi-ty merged commit dc513ff into main Nov 4, 2026
Adi-ty added a commit that referenced this pull request Nov 4, 2026
…#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.
@Adi-ty
Adi-ty deleted the feat/wp-ci-input-passthrough branch November 4, 2026 07:57
aryanjasala added a commit to justlevine/wp-shared-workflows that referenced this pull request Nov 5, 2026
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.
aryanjasala pushed a commit to rtCamp/plugin-elementary that referenced this pull request Nov 5, 2026
* 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>
aryanjasala pushed a commit to rtCamp/theme-elementary that referenced this pull request Nov 5, 2026
* 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>
@aryanjasala aryanjasala mentioned this pull request Nov 5, 2026
10 of 11 tasks
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.

4 participants