diff --git a/.github/workflows/pr_change_check.yml b/.github/workflows/pr_change_check.yml index 45c86264f869d8..e1d49b7b968370 100644 --- a/.github/workflows/pr_change_check.yml +++ b/.github/workflows/pr_change_check.yml @@ -22,12 +22,11 @@ jobs: - name: Determine changed files run: | - pr_ref="refs/pull/${{ github.event.number }}/merge" - echo $pr_ref - git fetch origin "$pr_ref" - git diff --name-only \ - "origin/${{ github.base_ref }}" \ - FETCH_HEAD > $HOME/changed_files + pr_url="https://github.com/${{ github.repository }}/pull/${{ github.event.number }}" + echo $pr_url + gh pr diff $pr_url --name-only > $HOME/changed_files + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Show files changed run: cat $HOME/changed_files