From f6d69e566ff6ef456fb2508bd17894333e21b22f Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Tue, 11 Nov 2025 17:23:47 -0800 Subject: [PATCH] pr-size-labeler - fetch change info for the maximum number of files By default the GHA endpoint `pulls/PULL_NUMBER/files` retrieves change data for up to 30 files which is insufficient for PRs that touch more files. Here we increase the count to the maximum per_page limit of 100. It does not seem worthwhile to add pagination processing as in the last year only 1% of PRs touched more than 100 files. Ref: https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests-files --- dev_tools/ci/size-labeler.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev_tools/ci/size-labeler.sh b/dev_tools/ci/size-labeler.sh index defcde544dc..c79fa5e8275 100755 --- a/dev_tools/ci/size-labeler.sh +++ b/dev_tools/ci/size-labeler.sh @@ -114,7 +114,7 @@ function compute_changes() { local response local change_info local -r keys_filter='with_entries(select([.key] | inside(["changes", "filename"])))' - response="$(api_call "pulls/${pr}/files")" + response="$(api_call "pulls/${pr}/files?per_page=100")" change_info="$(jq_stdin "map(${keys_filter})" <<<"${response}")" local files total_changes