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

Conversation

a-will
Copy link
Contributor

@a-will a-will commented Dec 23, 2024

Due to the file number limit for gh pr diff, change to comparing the checkout against the base branch.

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]>
@a-will a-will force-pushed the ci-work-with-file-limits branch from d496514 to 6b89ea9 Compare December 23, 2024 17:52
@a-will a-will requested a review from nbdd0121 December 23, 2024 17:53
@@ -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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants