Skip to content

Commit

Permalink
[ci] Use git commands instead of gh pr diff
Browse files Browse the repository at this point in the history
Due to the file number limit for `gh pr diff`, change to comparing the
checkout against the base branch.

Signed-off-by: Alexander Williams <[email protected]>
  • Loading branch information
a-will committed Dec 23, 2024
1 parent c31444b commit 6b89ea9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/pr_change_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
run: |
pr_url="https://github.com/${{ github.repository }}/pull/${{ github.event.number }}"
echo $pr_url
gh pr diff $pr_url --name-only > $HOME/changed_files
gh pr checkout $pr_url --name-only > $HOME/changed_files
BASE_BRANCH=$(gh pr view --json baseRefName --jq .baseRefName)
git diff --stat --name-only $BASE_BRANCH > $HOME/changed_files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit 6b89ea9

Please sign in to comment.