diff --git a/.github/workflows/clang-format-checker.yml b/.github/workflows/clang-format-checker.yml index 5a29a6d5f3..1f48412385 100644 --- a/.github/workflows/clang-format-checker.yml +++ b/.github/workflows/clang-format-checker.yml @@ -25,7 +25,8 @@ jobs: GH_TOKEN: ${{ github.token }} run: | echo Comparing $GITHUB_BASE_REF vs HEAD - git diff -U0 --no-color origin/$GITHUB_BASE_REF..HEAD | clang-format-diff -p1 | tee format.diff + git fetch origin refs/pull/$PR_NUMBER/head + git diff -U0 --no-color origin/$GITHUB_BASE_REF..refs/pull/$PR_NUMBER/head | clang-format-diff -p1 | tee format.diff if [ -s "format.diff" ] then echo PR contains clang-format violations. First 50 lines of the diff: >> message.txt