Skip to content

Commit

Permalink
PhpCsFixer: Fix pull requests from forks (#195)
Browse files Browse the repository at this point in the history
* PhpCsFixer: Fix pull requests from forks

* Update .php-cs-fixer.dist.php
  • Loading branch information
blankse authored Jun 28, 2024
1 parent 3d7b0d7 commit a1dd12f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/php-cs-fixer.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "PHP-CS-Fixer"

on:
pull_request:
pull_request_target:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
Expand All @@ -22,13 +22,14 @@ jobs:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:latest

- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply php-cs-fixer changes
commit_message: Apply php-cs-fixer changes
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
'no_leading_namespace_whitespace' => true,
'no_short_bool_cast' => true,
'no_spaces_around_offset' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true],
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'no_whitespace_before_comma_in_array' => true,
Expand Down

0 comments on commit a1dd12f

Please sign in to comment.