creyd/Prettier Action
Automatically runs prettier on all your changes.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Jun 9, 2025
- License
- MIT
Pinned Snippet
uses: creyd/prettier_action@8c18391fdc98ed0d884c6345f03975edac71b8f0 # v4.6tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| commit_message | Commit message, will be ignored if used with same_commit | no | Prettified Code! |
| commit_description | Extended commit message, will be ignored if used with same_commit | no | "" |
| same_commit | Update the current commit instead of creating a new one | no | false |
| commit_options | Commit options | no | — |
| push_options | Git push options | no | — |
| file_pattern | File pattern used for `git add`, can't be used with only_changed or only_changed_pr! | no | * |
| prettier_options | Options for the `prettier` command | no | --write **/*.js |
| dry | Running the script in dry mode just shows whether there are files that should be prettified or not | no | false |
| no_commit | Can be used to avoid committing the changes (can be combined with dry mode, useful when another workflow steps commits after this commit anyways) | no | false |
| prettier_version | Specific version of prettier (by default just use the latest version) | no | latest |
| working_directory | Specify a directory to cd into before installing prettier and running it | no | ${{ github.action_path }} |
| only_changed | Only prettify files changed in the last commit, can't be used with file_pattern! | no | false |
| only_changed_pr | Only prettify files changed in the current PR. If specified with only_changed, only_changed will take precedent. Can't be used with file_pattern! | no | false |
| prettier_plugins | Install Prettier plugins, i.e. `@prettier/plugin-php @prettier/plugin-other` | no | "" |
| github_token | GitHub Token or PAT token used to authenticate against a repository | no | ${{ github.token }} |
| clean_node_folder | Remove the node_modules folder before committing changes | no | true |
| git_identity | Which identity is used for git name/email when committing changes. Needs to be one of "actions" or "author". | no | actions |
| allow_other_plugins | Allow other plugins to be installed. By default, we are checking if the plugins are actually prettier plugins. | no | false |
Outputs
no outputs