Skip to content

fix: replace unavailable actionsx/prettier with the Prettier CLI - #153

Merged
cvscarlos merged 6 commits into
mainfrom
replace-prettier-action
Sep 3, 2026
Merged

fix: replace unavailable actionsx/prettier with the Prettier CLI#153
cvscarlos merged 6 commits into
mainfrom
replace-prettier-action

Conversation

@cvscarlos

@cvscarlos cvscarlos commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

https://github.com/actionsx/prettier is gone, so every job using it fails before running a step:

##[error]Unable to resolve action actionsx/prettier, repository not found

Actions does not follow repository redirects, so a tag bump cannot fix it.
yaml.yaml and json.yaml now run npx --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

  • npx rather than npm ci: calling repositories are not necessarily Node projects, so the check cannot depend on a package.json.
  • The two additional_args branches collapse into one step, with the input passed through env so it cannot inject shell.
  • The self-lint jobs now call ./.github/workflows/… instead of @v9, so a PR validates its own changes.
  • chore: .gitignore entries grouped, sorted, and given trailing slashes.

cvscarlos and others added 2 commits September 2, 2026 13:56
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>
cvscarlos and others added 3 commits September 2, 2026 13:57
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>
@cvscarlos
cvscarlos marked this pull request as ready for review September 2, 2026 12:11
Copilot AI lite review requested due to automatic review settings September 2, 2026 12:11
@cvscarlos
cvscarlos requested a review from a team as a code owner September 2, 2026 12:11

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.

🟡 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/prettier usage in reusable YAML/JSON workflows with npx --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 .gitignore entries.
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.

Comment thread .github/workflows/yaml.yaml Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

Comment thread .github/workflows/json.yaml Outdated
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>
@cvscarlos
cvscarlos merged commit 5c30aa1 into main Sep 3, 2026
6 checks passed
@cvscarlos
cvscarlos deleted the replace-prettier-action branch September 3, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants