Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .github/workflows/polish-the-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,34 @@ permissions:
contents: read

jobs:
commit-check:
runs-on: ubuntu-latest
# use permissions because pull-request comments are used
permissions:
contents: read
pull-requests: write
# Limit the running time
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit
fetch-depth: 0 # required for merge-base check
persist-credentials: false
- uses: commit-check/commit-check-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because use of pr-comments
with:
message: true
# to accept dependabot/github_actions/*
# branch: false # todo might not be necessary as "dependabot[bot]" author is ignored
author-name: true
author-email: true
job-summary: true
pr-comments: ${{ github.event_name == 'pull_request' }}

super-linter:
uses: WorkOfStan/seablast-actions/.github/workflows/linter.yml@v0.2.5.1
needs: commit-check
uses: WorkOfStan/seablast-actions/.github/workflows/linter.yml@v0.2.7
with:
runs-on: "ubuntu-latest"
4 changes: 2 additions & 2 deletions .github/workflows/prettier-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
timeout-minutes: 10
steps:
- name: Invoke the Prettier fix
# Use the latest commit in the main branch.
uses: WorkOfStan/prettier-fix@main
# Use the latest minor version within the current major version.
uses: WorkOfStan/prettier-fix@v1
with:
commit-changes: true
#debug: true
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Security` in case of vulnerabilities

## [1.1.6.2] - 2025-10-23

chore: make the commit message compliant with Conventional Commits

### Changed

- make the commit message compliant with Conventional Commits
- Bump [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v6)

## [1.1.6.1] - 2025-09-13

fix: Tags MUST NOT trigger the GitHub Action.
Expand Down Expand Up @@ -123,7 +134,8 @@ fix: pull request issues

- This GitHub Action automates Prettier formatting across your project, ensuring consistent code styling by creating a new branch for review when necessary. It simplifies integrating Prettier into your workflow, although updates to workflow YAML files in `.github/workflows/` must be done manually.

[Unreleased]: https://github.com/WorkOfStan/prettier-fix/compare/v1.1.6.1...HEAD
[Unreleased]: https://github.com/WorkOfStan/prettier-fix/compare/v1.1.6.2...HEAD
[1.1.6.2]: https://github.com/WorkOfStan/prettier-fix/compare/v1.1.6.1...v1.1.6.2?w=1
[1.1.6.1]: https://github.com/WorkOfStan/prettier-fix/compare/v1.1.6...v1.1.6.1?w=1
[1.1.6]: https://github.com/WorkOfStan/prettier-fix/compare/v1.1.5...v1.1.6?w=1
[1.1.5]: https://github.com/WorkOfStan/prettier-fix/compare/v1.1.4...v1.1.5?w=1
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 WorkOfStan
Copyright (c) 2024-2025 WorkOfStan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ permissions:

### Inputs (all optional)

| Input | Description | Type | Default |
| ---------------------- | ------------------------------------------------------------------------------ | ------- | ---------------------------------------- |
| `commit-changes` | If `true`, commits changes to the current branch instead of creating a new one | Boolean | `false` |
| `commit-message` | Commit message for the changes | String | `"Prettier fixes applied automatically"` |
| `debug` | Enable extra debug output (list of branches). | Boolean | `false` |
| `node-version` | Node.js version to use | String | `"20"` |
| `prettier-config-path` | Optional path to a custom Prettier config file | String | `""` |
| `skip-package-setup` | If `true`, skips `npm init` and dependency installation steps | Boolean | `false` |
| Input | Description | Type | Default |
| ---------------------- | ------------------------------------------------------------------------------ | ------- | ------------------------------------------------------- |
| `commit-changes` | If `true`, commits changes to the current branch instead of creating a new one | Boolean | `false` |
| `commit-message` | Commit message for the changes | String | `"chore(prettier): apply Prettier fixes automatically"` |
| `debug` | Enable extra debug output (list of branches). | Boolean | `false` |
| `node-version` | Node.js version to use | String | `"20"` |
| `prettier-config-path` | Optional path to a custom Prettier config file | String | `""` |
| `skip-package-setup` | If `true`, skips `npm init` and dependency installation steps | Boolean | `false` |

Note: 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

Expand Down
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ inputs:
commit-message:
description: "Commit message for the changes"
type: string
default: "chore: Prettier fixes applied automatically"
default: "chore(prettier): apply Prettier fixes automatically"
debug:
description: "Enable extra debug output"
type: boolean
Expand Down Expand Up @@ -47,6 +47,10 @@ outputs:
runs:
using: "composite"
steps:
- name: Display version
run: echo "prettier-fix::v1.1.6.2 running"
shell: bash

- name: Checkout code
uses: actions/checkout@v5
with:
Expand All @@ -59,7 +63,7 @@ runs:
shell: bash

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}

Expand Down