Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Use alternative mechanisms to avoid github API file limits #25744

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to change the checkout sha above to

      with:
        ref: refs/pull/${{ github.event.pull_request.number }}/merge
        fetch-depth: 2 # include merge commit parents

which should allow direct diff without needing to checkout again?

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
Loading