From 7de08e175176e660ed98ac52850414dbd78c9c15 Mon Sep 17 00:00:00 2001 From: Christopher Allford <6451942+ObliviousHarmony@users.noreply.github.com> Date: Tue, 26 Sep 2023 11:40:38 -0700 Subject: [PATCH] Fixed PHPCS Base Comparison --- .github/workflows/pr-code-sniff.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-code-sniff.yml b/.github/workflows/pr-code-sniff.yml index e02c5437a66..30c690db906 100644 --- a/.github/workflows/pr-code-sniff.yml +++ b/.github/workflows/pr-code-sniff.yml @@ -26,11 +26,10 @@ jobs: - name: Get Changed Files id: changed-files - uses: tj-actions/changed-files@v32 + uses: tj-actions/changed-files@v39 with: path: plugins/woocommerce - files: | - **/*.php + files: "**/*.php" - name: Setup WooCommerce Monorepo if: steps.changed-files.outputs.any_changed == 'true' @@ -49,7 +48,4 @@ jobs: - name: Run PHPCS if: steps.changed-files.outputs.any_changed == 'true' working-directory: plugins/woocommerce - run: | - HEAD_REF=$(git rev-parse HEAD) - git checkout $HEAD_REF - phpcs-changed -s --git --git-base ${{ github.base_ref }} ${{ steps.changed-files.outputs.all_changed_files }} + run: phpcs-changed -s --git --git-base ${{ github.event.pull_request.base.sha }} ${{ steps.changed-files.outputs.all_changed_files }}