diff --git a/.github/workflows/polish-the-code.yml b/.github/workflows/polish-the-code.yml index 2629278..6b85082 100644 --- a/.github/workflows/polish-the-code.yml +++ b/.github/workflows/polish-the-code.yml @@ -22,6 +22,34 @@ permissions: contents: read jobs: + commit-check: + runs-on: ubuntu-latest + permissions: # use permissions because use of pr-comments + 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@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because use of pr-comments + with: + message: true + # to accept dependabot/github_actions/* + branch: false + author-name: true + author-email: true + commit-signoff: false + merge-base: false + imperative: false + job-summary: true + pr-comments: ${{ github.event_name == 'pull_request' }} + prettier-fix: # Note: runs-on doesn't accept all expressions, so a string is used runs-on: "ubuntu-latest" @@ -31,12 +59,12 @@ jobs: timeout-minutes: 10 steps: - name: Invoke the Prettier fix - uses: WorkOfStan/prettier-fix@v1.1.3 + uses: WorkOfStan/prettier-fix@v1.1.6.1 with: commit-changes: ${{ github.event_name != 'schedule' }} super-linter: needs: prettier-fix - uses: WorkOfStan/seablast-actions/.github/workflows/linter.yml@v0.2.3 + uses: WorkOfStan/seablast-actions/.github/workflows/linter.yml@v0.2.6 with: runs-on: "ubuntu-latest" diff --git a/CHANGELOG.md b/CHANGELOG.md index 7630dbe..d9974aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Security` in case of vulnerabilities +## [1.0.3] - 2025-10-04 + +- feat: the default commit message made compliant with Conventional Commits + +### Changed + +- the default commit message made compliant with [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) +- chore(super-linter): Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 8.1.0 to 8.2.0. + ## [1.0.2] - 2025-05-31 fix: Fix pull request issues @@ -51,7 +60,8 @@ fix: Fix pull request issues - The new boolean input `stop-on-manual-fix` will cause the workflow to stop (fail) if manual fixes are necessary. (Also stops with an error if some manual fixes are required on top of automatic fixes.) - Cached `vendor/` (for a unique combination of php-version and composer.json) after a successful run in order to speed up further runs. -[Unreleased]: https://github.com/WorkOfStan/phpcs-fix/compare/v1.0.2...HEAD?w=1 +[Unreleased]: https://github.com/WorkOfStan/phpcs-fix/compare/v1.0.3...HEAD?w=1 +[1.0.3]: https://github.com/WorkOfStan/phpcs-fix/compare/v1.0.2...v1.0.3?w=1 [1.0.2]: https://github.com/WorkOfStan/phpcs-fix/compare/v1.0.1...v1.0.2?w=1 [1.0.1]: https://github.com/WorkOfStan/phpcs-fix/compare/v1.0.0...v1.0.1?w=1 [1.0.0]: https://github.com/WorkOfStan/phpcs-fix/releases/tag/v1.0.0 diff --git a/README.md b/README.md index 2c99aec..df6814b 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ permissions: | Input | Description | Type | Default | | -------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `commit-changes` | If set to `true`, the action will commit changes to the current branch; otherwise a new branch is created for manual review. | Boolean | `false` | -| `commit-message` | Commit message to use if the action commits changes. | String | `"PHP Code Beautifier fixes applied automatically"` | +| `commit-message` | Commit message to use if the action commits changes. | String | `"chore(phpcf): PHP Code Beautifier fixes applied automatically"` | | `debug` | Enable extra debug output (list of branches). | Boolean | `false` | | `extensions` | Comma-delimited list of file extensions to be sniffed. Note: an empty value will disable checking. | String | `"php"` (defaults to PHP only; other file types must be specified) | | `ignore` | Ignore files based on a comma-separated list of patterns matching files and/or directories. | String | `vendor/` | diff --git a/action.yml b/action.yml index 3388c7f..41e828d 100644 --- a/action.yml +++ b/action.yml @@ -19,7 +19,7 @@ inputs: commit-message: description: "Commit message for the changes" type: string - default: "PHP Code Beautifier fixes applied automatically" + default: "chore(phpcf): PHP Code Beautifier fixes applied automatically" debug: description: "Enable extra debug output" type: boolean @@ -64,7 +64,7 @@ runs: using: "composite" steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ github.ref }} # Fetch latest changes (even by previous job) fetch-depth: 0 # Fetch all history for all branches and tags. Otherwise github.event.pull_request.base.ref SHA isn't found. diff --git a/hello-world.php b/hello-world.php new file mode 100644 index 0000000..d635cfa --- /dev/null +++ b/hello-world.php @@ -0,0 +1,3 @@ +