From de66e234c968e6ddc6897b6e92446ae76042c411 Mon Sep 17 00:00:00 2001 From: Al N Date: Wed, 31 Jul 2024 14:59:42 +0300 Subject: [PATCH] clean lint workflow --- .github/workflows/php-style-lint.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/php-style-lint.yml b/.github/workflows/php-style-lint.yml index a1167c3..e39e7eb 100644 --- a/.github/workflows/php-style-lint.yml +++ b/.github/workflows/php-style-lint.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest env: - GH_TOKEN: ${{ github.token }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Setup PHP @@ -31,5 +31,8 @@ jobs: # Run `phpcs` on the remaining files and pass output to `cs2pr`. run: | echo "Files for this PR:" - gh pr diff ${{ github.event.number }} --name-only | grep .php | xargs find 2> /dev/null | cat - gh pr diff ${{ github.event.number }} --name-only | grep .php | xargs find 2> /dev/null | xargs vendor/bin/phpcs -nq --report=checkstyle | cs2pr + git diff --name-only ${{ github.event.after }} ${{ github.event.before }} | grep .php | xargs find 2> /dev/null | cat + git diff --name-only ${{ github.event.after }} ${{ github.event.before }} | grep .php | xargs find 2> /dev/null | xargs vendor/bin/phpcs -nq --report=checkstyle | cs2pr + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR: ${{ github.event.number }}