Skip to content

Commit c444498

Browse files
authored
pr-size-labeler - fetch change info for the maximum number of files (#7749)
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
1 parent 3e0e213 commit c444498

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dev_tools/ci/size-labeler.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function compute_changes() {
114114
local response
115115
local change_info
116116
local -r keys_filter='with_entries(select([.key] | inside(["changes", "filename"])))'
117-
response="$(api_call "pulls/${pr}/files")"
117+
response="$(api_call "pulls/${pr}/files?per_page=100")"
118118
change_info="$(jq_stdin "map(${keys_filter})" <<<"${response}")"
119119

120120
local files total_changes

0 commit comments

Comments
 (0)