Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b71c431428
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| description: "Package manager to use ('bun' or 'yarn')" | ||
| required: false | ||
| default: "bun" | ||
| type: string |
There was a problem hiding this comment.
Reject unknown managers before skipping Jest
When a reusable caller supplies anything other than the exact bun or yarn strings (for example, a typo), this unrestricted string input passes workflow-call validation, but every setup/install/test branch is skipped; the always-running summary step then exits successfully when no dashboard exists, so the required test check is green without running tests. Add an explicit validation step or a failing fallback branch.
Useful? React with 👍 / 👎.
| description: "Package manager to use ('bun' or 'yarn')" | ||
| required: false | ||
| default: "bun" | ||
| type: string |
There was a problem hiding this comment.
Reject unknown managers before skipping Knip
When a reusable caller passes a misspelled or unsupported package manager, this string input is accepted but all Bun/Yarn setup, install, and Knip steps are skipped; Store PR number still succeeds, so the workflow reports success without performing the analysis. Add input validation or an explicit failing fallback for values other than bun and yarn.
Useful? React with 👍 / 👎.
| - name: Run Tests (Yarn) | ||
| if: ${{ inputs.package-manager == 'yarn' }} | ||
| run: | | ||
| ${{ inputs.install-command || 'yarn install --immutable' }} |
There was a problem hiding this comment.
Handle Yarn Classic in the Jest install command
When a caller selects yarn and requests a Classic release such as yarn-version: 1.22.22, the default install exits before tests because Yarn Classic does not accept --immutable; its documented lock-preserving option is --frozen-lockfile, while Berry documents that option as the backward-compatible alias for --immutable (details). Either constrain the accepted Yarn versions to Berry or choose the install flag by major version.
Useful? React with 👍 / 👎.
|
|
||
| - name: Install toolchain (Yarn) | ||
| if: ${{ inputs.package-manager == 'yarn' }} | ||
| run: ${{ inputs.install-command || 'yarn install --immutable' }} |
There was a problem hiding this comment.
Handle Yarn Classic in the Knip install command
When a caller selects yarn and requests a Classic release such as yarn-version: 1.22.22, the default install fails before Knip because Yarn Classic does not accept --immutable; its documented lock-preserving option is --frozen-lockfile, while Berry documents that option as the backward-compatible alias for --immutable (details). Either constrain the accepted Yarn versions to Berry or vary the install flag by major version.
Useful? React with 👍 / 👎.
Summary
Converts the
.github/workflows/knip.ymland.github/workflows/jest-testing.ymlworkflows into reusable GitHub Actions workflows (workflow_call) so repositories inheriting fromplugin-templatecan invoke them centrally while customizing their package manager (bunvsyarn), runtime versions, and execution commands.Changes
workflow_calltriggers to.github/workflows/knip.ymlwith configurable inputs forpackage-manager,bun-version,node-version,yarn-version,install-command,knip-command, andknip-json-command.workflow_calltriggers to.github/workflows/jest-testing.ymlwith configurable inputs forpackage-manager,bun-version,node-version,yarn-version,install-command, andtest-command.pull_requestandworkflow_dispatchexecution inplugin-templateand compatible artifact upload forknip-reporter.yml.Resolves #13
Fixes #13