fix: replace unavailable actionsx/prettier with the Prettier CLI - #153
Conversation
The actionsx/prettier repository is gone, so every job using it fails with "Unable to resolve action actionsx/prettier, repository not found" before running a step. Actions does not follow repository redirects, so bumping the tag does not help. Run the pinned Prettier CLI through npx instead. Calling repositories are not necessarily Node projects, so the check must not depend on a package.json being present. The additional_args branches collapse into a single step, and the input now reaches the shell through env rather than being interpolated into run. Co-Authored-By: Claude <noreply@anthropic.com>
Split the entries into directories and files, sort each group, add the missing trailing slashes, and drop the unused log/ rule. Co-Authored-By: Claude <noreply@anthropic.com>
actionlint flags the unquoted expansion (SC2086), but the input is documented as a list of globs, so word splitting is the intended behaviour. Quoting it would collapse the list into a single argument. Co-Authored-By: Claude <noreply@anthropic.com>
The self-lint jobs called the workflows at @v9, so a PR was validated against the last released tag instead of its own changes. Point them at the local path so a change to yaml.yaml or json.yaml is exercised by the PR that makes it. release.yaml stays pinned, since a broken branch must not break releases. Co-Authored-By: Claude <noreply@anthropic.com>
The "see ci.pr.yaml" pointers duplicated what the ./ path already says and would dangle if that file were renamed. The two surviving comments record a decision the code cannot: why npx instead of npm ci, and why the local copy instead of the released tag. Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The YAML workflow currently allows shell glob expansion on additional_args, which can make linting behavior inconsistent/unexpected compared to Prettier’s own glob handling.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the reusable YAML/JSON linting workflows to stop depending on the now-unavailable actionsx/prettier action by invoking the Prettier CLI directly via npx, and aligns the repo’s own formatting tooling with the same Prettier major version.
Changes:
- Replace
actionsx/prettierusage in reusable YAML/JSON workflows withnpx --yes prettier@3.9.6 --check …. - Update self-lint workflows to call the local reusable workflows so PRs validate their own workflow edits.
- Bump the repo’s dev dependency from Prettier 2 to Prettier 3 and tidy
.gitignoreentries.
File summaries
| File | Description |
|---|---|
| package.json | Bumps Prettier devDependency to 3.9.6 to match the new workflow linting behavior. |
| package-lock.json | Updates lockfile entries for Prettier 3.9.6. |
| .gitignore | Reorganizes ignore patterns and adds trailing slashes for directories. |
| .github/workflows/yaml.yaml | Replaces actionsx/prettier with an npx prettier --check invocation and consolidates conditional steps. |
| .github/workflows/json.yaml | Replaces actionsx/prettier with an npx prettier --check invocation. |
| .github/workflows/ci.yaml.yaml | Switches YAML CI workflow to use the local reusable YAML workflow definition. |
| .github/workflows/ci.pr.yaml | Switches PR YAML lint job to use the local reusable YAML workflow definition. |
| .github/workflows/ci.json.yaml | Switches JSON CI workflow to use the local reusable JSON workflow definition. |
Review details
- Files reviewed: 6/8 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98e1fca0c0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The action this replaced ran in a container, so it did not need node on the runner. npx does, and the runner input accepts arbitrary values, so set up node explicitly rather than relying on the image shipping it. Also disable pathname expansion around additional_args. Word splitting is wanted, glob expansion is not: bash was resolving the patterns against the checkout before prettier saw them, and collapsing ** to a single level. The first pattern was already quoted for this reason. Add -- so a pattern cannot be read as an option. Co-Authored-By: Claude <noreply@anthropic.com>
Summary
https://github.com/actionsx/prettier is gone, so every job using it fails before running a step:
Actions does not follow repository redirects, so a tag bump cannot fix it.
yaml.yamlandjson.yamlnow runnpx --yes prettier@3.9.6 --check …directly.Important
This moves the linters from Prettier 2 to Prettier 3.
Repositories formatted under Prettier 2 may need a one-off
prettier --write.Notes
npxrather thannpm ci: calling repositories are not necessarily Node projects, so the check cannot depend on apackage.json.additional_argsbranches collapse into one step, with the input passed throughenvso it cannot inject shell../.github/workflows/…instead of@v9, so a PR validates its own changes..gitignoreentries grouped, sorted, and given trailing slashes.