Releases: WorkOfStan/prettier-fix
Releases · WorkOfStan/prettier-fix
Option to commit to the current branch
Added
- The input parameter
commit-changes: true
to commit to the current branch. - Customizable Commit Message: Introduced an input
commit-message
to allow users to specify a custom commit message. - Branch Name Output: The
branch-name
is now provided as an output for downstream workflows. - Prettier Installation Check: Ensures
Prettier
is installed and available even ifskip-package-setup
is true. - Added detailed logging to improve the visibility of action progress and conditional steps.
Changed
- Manual Workflow File Change Warnings: Improved warnings for
.github/workflows/
changes, providing clear guidance without restoring or resetting these files. - Cleanup Logic Enhancements: Enhanced cleanup logic to remove temporary
package.json
,package-lock.json
, andnode_modules
only when necessary.
Revert changes in .github/workflows/ one by one
Fixed
- Revert changes in .github/workflows/*.yml before checking other changes, so when only non-editable files should be changed, no new branch is created and the action still gracefully exit 0.
Graceful exit even for uneditable changes
- fixed: If only changes are in .github/workflows/*.yml , then the action still should gracefully exit 0.
Improve warning messages
- A warning appears in the GitHub Actions Annotations section if changes occur and therefore a new branch is created.
- A proposed manual changed linked from the warning in the GitHub Actions Annotations section.
A GitHub Action to apply Prettier fixes
How to Use It
To automate Prettier, simply add the provided YAML configuration to your repository. If needed, a new branch with a name starting with prettier/
will be created, making it easy to review and merge the fixes into your main branch.
Important Note for Workflow YAMLs
If the changes involve files within the .github/workflows/
directory, these need to be updated manually. After making the necessary adjustments, simply create a pull request to finalize the changes and keep your repository in top shape.