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
16 changes: 13 additions & 3 deletions .github/workflows/phpcs-phpcbf.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
---
name: Phpcs-fix
on: [pull_request, push]

on:
push:
branches-ignore:
# notest branches to ignore testing of partial online commits
- "notest/**"

pull_request:
branches-ignore:
# notest branches to ignore testing of partial online commits
- "notest/**"

permissions:
contents: write
Expand All @@ -12,8 +22,8 @@ jobs:
timeout-minutes: 10
steps:
- name: Invoke the PHPCS check and PHPCBF fix
# Use the latest commit in the main branch.
uses: WorkOfStan/phpcs-fix@main
# Use the latest minor version within the current major version.
uses: WorkOfStan/phpcs-fix@v1
with:
commit-changes: true
#debug: true
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/polish-the-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ permissions:
jobs:
commit-check:
runs-on: ubuntu-latest
permissions: # use permissions because use of pr-comments
# use permissions because pull-request comments are used
permissions:
contents: read
pull-requests: write
# Limit the running time
Expand All @@ -35,18 +36,15 @@ jobs:
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
- 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
# branch: false # todo might not be necessary as "dependabot[bot]" author is ignored
author-name: true
author-email: true
commit-signoff: false
merge-base: false
imperative: false
job-summary: true
pr-comments: ${{ github.event_name == 'pull_request' }}

Expand All @@ -59,12 +57,12 @@ jobs:
timeout-minutes: 10
steps:
- name: Invoke the Prettier fix
uses: WorkOfStan/prettier-fix@v1.1.6.1
uses: WorkOfStan/prettier-fix@v1
with:
commit-changes: ${{ github.event_name != 'schedule' }}

super-linter:
needs: prettier-fix
uses: WorkOfStan/seablast-actions/.github/workflows/[email protected].6
needs: [prettier-fix, commit-check]
uses: WorkOfStan/seablast-actions/.github/workflows/[email protected].7
with:
runs-on: "ubuntu-latest"
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Security` in case of vulnerabilities

## [1.0.4] - 2025-10-23

fix: don't trigger a GitHub Action by a Tag

### Changed

- bump GitHub Action's versions
- make the commit message compliant with Conventional Commits

### Fixed

- Trigger changed to ignore tags. I.e. change of the original trigger `on: [pull_request, push]` which caught also tags. (When running on a tag, actions/checkout runs on refs/tags/vX.Y.Z, so you end up with a detached HEAD, and github.head_ref is empty (it only exists on pull_request).)

## [1.0.3] - 2025-10-04

- feat: the default commit message made compliant with Conventional Commits
feat: the default commit message made compliant with Conventional Commits

### Changed

Expand Down Expand Up @@ -60,7 +73,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.3...HEAD?w=1
[Unreleased]: https://github.com/WorkOfStan/phpcs-fix/compare/v1.0.4...HEAD?w=1
[1.0.4]: https://github.com/WorkOfStan/phpcs-fix/compare/v1.0.3...v1.0.4?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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `"chore(phpcf): PHP Code Beautifier fixes applied automatically"` |
| `commit-message` | Commit message to use if the action commits changes. | String | `"chore(phpcf): apply PHP Code Beautifier fixes 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/` |
Expand Down
6 changes: 5 additions & 1 deletion 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(phpcf): PHP Code Beautifier fixes applied automatically"
default: "chore(phpcf): apply PHP Code Beautifier fixes automatically"
debug:
description: "Enable extra debug output"
type: boolean
Expand Down Expand Up @@ -63,6 +63,10 @@ outputs:
runs:
using: "composite"
steps:
- name: Display version
run: echo "phpcs-fix::v1.0.4 running"
shell: bash

- name: Checkout code
uses: actions/checkout@v5
with:
Expand Down
Loading