{"id":15077872,"url":"https://github.com/workofstan/prettier-fix","last_synced_at":"2026-03-09T10:34:00.924Z","repository":{"id":254020934,"uuid":"845246795","full_name":"WorkOfStan/prettier-fix","owner":"WorkOfStan","description":"Automatically apply Prettier formatting and create a pull request to fix code style issues, ensuring compatibility with Super-Linter.","archived":false,"fork":false,"pushed_at":"2025-03-01T21:42:20.000Z","size":1036,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T18:07:57.010Z","etag":null,"topics":["code-quality","continuous-integration","prettier","super-linter"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WorkOfStan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-20T22:01:12.000Z","updated_at":"2025-03-01T21:41:38.000Z","dependencies_parsed_at":"2024-08-20T23:49:29.628Z","dependency_job_id":"e9d89d86-8061-4b24-a3c8-19b1ce8b6c1d","html_url":"https://github.com/WorkOfStan/prettier-fix","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"0bfacfddd5d8dbcbc7ffc7e28407958801f12982"},"previous_names":["workofstan/prettier-fix"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorkOfStan%2Fprettier-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorkOfStan%2Fprettier-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorkOfStan%2Fprettier-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WorkOfStan%2Fprettier-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WorkOfStan","download_url":"https://codeload.github.com/WorkOfStan/prettier-fix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248283865,"owners_count":21077937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-quality","continuous-integration","prettier","super-linter"],"created_at":"2024-09-25T04:33:15.512Z","updated_at":"2026-03-09T10:34:00.870Z","avatar_url":"https://github.com/WorkOfStan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prettier-Fix\n\nWith the release of [Super-Linter](https://github.com/super-linter/super-linter) 7.0.0, [Prettier](https://prettier.io/) has become the standard for many file formats, ensuring consistent code styling across your projects. Embrace this change and keep your codebase looking sharp by integrating Prettier directly into your workflow. While you can still rely on your favorite IDE to apply Prettier's formatting, why not automate the process with this GitHub Action using vanilla Prettier?\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/images/social-preview.png\" width=\"128\" alt=\"accessibility text\"\u003e\n\u003c/p\u003e\n\n## Features\n\n- **Automatic Fixes:** Automatically formats code using Prettier.\n- **Flexible Committing:** Creates a new branch (prefixed with `prettier/fix`) if changes are required, making it easy to review and merge. Or you can set the input parameter `commit-changes: true` to commit to the current branch. (Recommendation: start with committing to another branch and review in order to avoid surprises. Then commit to the same branch for incremental changes.)\n- **Configurable:** Allows for customizable commit messages via the `commit-message` input.\n- Provides the branch name as an output for downstream workflows.\n- Issues warnings for manual changes needed in `.github/workflows` files.\n\n## How to Use It\n\nTo automate Prettier, simply add [the provided YAML configuration](.github/workflows/prettier-fix.yml) to your repository.\n\nBy default, if necessary, a new branch with a name starting with `prettier/fix` will be created, making it easy to review and merge fixes into your main branch.\n\nNote: This action is non-blocking, so the status remains green even when changes are proposed via a new branch.\nA notice message is displayed, and it is then up to you to either create a pull request to merge the changes or delete the branch.\n\n### Permissions\n\nThis action requires the following permissions:\n\n```yaml\npermissions:\n  contents: write\n```\n\n### Inputs (all optional)\n\n| Input                | Description                                                                    | Type    | Default                                  |\n| -------------------- | ------------------------------------------------------------------------------ | ------- | ---------------------------------------- |\n| `commit-changes`     | If `true`, commits changes to the current branch instead of creating a new one | Boolean | `false`                                  |\n| `commit-message`     | Commit message for the changes                                                 | String  | `\"Prettier fixes applied automatically\"` |\n| `node-version`       | Node.js version to use                                                         | String  | `\"20\"`                                   |\n| `skip-package-setup` | If `true`, skips `npm init` and dependency installation steps                  | Boolean | `false`                                  |\n\nNote: it would be possible to use `git-user-name` and `git-user-email` as inputs to set-up the info about the author of the commits, but for clarity [actions/checkout](https://github.com/actions/checkout?tab=readme-ov-file#push-a-commit-using-the-built-in-token) recommends\n\n```\n  git config user.name \"github-actions[bot]\"\n  git config user.email \"41898282+github-actions[bot]@users.noreply.github.com\"\n```\n\nBtw: GitHub displays the author's name according to a known email.\n\n### Outputs\n\n| Output        | Description                         |\n| ------------- | ----------------------------------- |\n| `branch-name` | The name of the branch created/used |\n\n## Important Note for Workflow YAMLs\n\nIf the changes involve files within the `.github/workflows/` directory, these cannot be done automatically and need to be updated manually.\nSo, it also checks for any changes made to the `.github/workflows` directory and issues a warning if changes are detected, advising you to manually review and fix these to avoid conflicts with Super-Linter.\nAfter making the necessary adjustments, simply create a pull request to finalize the changes and keep your repository in top shape.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkofstan%2Fprettier-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkofstan%2Fprettier-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkofstan%2Fprettier-fix/lists"}