Describe the bug
gh pr view --json files and gh pr view --json commits return at most 100 items, silently dropping any beyond the first page. This is because the GraphQL fragments for prFiles and prCommits do not include pageInfo, and there are no corresponding preloadPr* pagination functions — unlike reviews, comments, and closingIssuesReferences, which already paginate correctly.
Steps to reproduce
# On any PR with >100 changed files:
gh pr view 12345 --json files --jq ".files | length"
# Always returns 100, even if the PR has 200+ files
Expected vs actual behavior
Expected: All files/commits are returned, regardless of count.
Actual: Silently truncated to 100.
Context
This was identified in #12522 (making gh better for agents). Silent truncation is particularly problematic for automated workflows that assume complete data. The fix follows the exact pagination pattern already used by preloadPrReviews, preloadPrComments, and preloadPrClosingIssuesReferences in finder.go.
Describe the bug
gh pr view --json filesandgh pr view --json commitsreturn at most 100 items, silently dropping any beyond the first page. This is because the GraphQL fragments forprFilesandprCommitsdo not includepageInfo, and there are no correspondingpreloadPr*pagination functions — unlikereviews,comments, andclosingIssuesReferences, which already paginate correctly.Steps to reproduce
Expected vs actual behavior
Expected: All files/commits are returned, regardless of count.
Actual: Silently truncated to 100.
Context
This was identified in #12522 (making gh better for agents). Silent truncation is particularly problematic for automated workflows that assume complete data. The fix follows the exact pagination pattern already used by
preloadPrReviews,preloadPrComments, andpreloadPrClosingIssuesReferencesinfinder.go.