Skip to content

gen-release-notes: fix pagination when listing PR files - #3422

Open
potsju wants to merge 1 commit into
istio:masterfrom
potsju:fix-release-notes-pr-file-pagination
Open

gen-release-notes: fix pagination when listing PR files#3422
potsju wants to merge 1 commit into
istio:masterfrom
potsju:fix-release-notes-pr-file-pagination

Conversation

@potsju

@potsju potsju commented Jul 2, 2026

Copy link
Copy Markdown

The tool was using gh pr view --json=files to get the list of files changed in a PR, but that command only returns the first page of results (around 100 files) and doesn't fetch the rest. On PRs bigger than that, files near the end of the list get silently dropped, including release note files, which caused false "missing release notes" errors on large PRs.

Example: istio/istio#60755

Switched to calling GitHub's paginated REST API directly, which keeps fetching pages until it has the full file list, no matter how big the PR is.

@potsju
potsju requested a review from a team as a code owner July 2, 2026 05:04
@istio-policy-bot

Copy link
Copy Markdown

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

@istio-policy-bot

Copy link
Copy Markdown

😊 Welcome @potsju! This is either your first contribution to the Istio tools repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 2, 2026
@potsju
potsju force-pushed the fix-release-notes-pr-file-pagination branch from c033c3b to c00b062 Compare July 2, 2026 05:09
The tool was using `gh pr view --json=files` to get the list of files
changed in a PR, but that command only returns the first page of
results (around 100 files) and doesn't fetch the rest. On PRs bigger
than that, files near the end of the list get silently dropped,
including release note files, which caused false "missing release
notes" errors on large PRs.

Example: istio/istio#60755

Switched to calling GitHub's paginated REST API directly, which keeps
fetching pages until it has the full file list, no matter how big the
PR is.
@potsju
potsju force-pushed the fix-release-notes-pr-file-pagination branch from c00b062 to b8c5efe Compare July 2, 2026 05:11
@fjglira

fjglira commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Hey, I'll make some room to test the changes this week. Thanks a lot for checking this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants