You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Schema Inaccuracy] Commit compare endpoint limits the number of files returned #33
I noticed this today when working with the REST API via Octokit. The number of files returned in the first page of results even when using pagination is still limited to 300 and the documentation doesn't reflect this. The behavior also still exists in the repro example in the original issue. Is there an alternative way to get the full list of files for large comparisons?
If I summarize the response from the API, and I implement paging, I get 9 pages, but only one specifies files:
Comparison --
Page: total files: 300, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 100
Page: total files: 0, total commits: 6
According to the docs for comparison, "The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison"
Activity
ahoglund commentedon Sep 2, 2020
Thanks @petewalker, will take a look at this and if/how we can clarify this in the description.
petewalker commentedon Mar 24, 2021
This appears to be resolved: https://github.blog/changelog/2021-03-22-compare-rest-api-now-supports-pagination/
craigpalermo commentedon Mar 28, 2024
I noticed this today when working with the REST API via Octokit. The number of files returned in the first page of results even when using pagination is still limited to 300 and the documentation doesn't reflect this. The behavior also still exists in the repro example in the original issue. Is there an alternative way to get the full list of files for large comparisons?
kylannjohnson commentedon Apr 29, 2024
This seems to still be an issue even with paging implemented. If I compare https://api.github.com/repos/OWNER/REPO/compare/... to its html equivalent, the html page gives 812 file changed with 4889 changes.
If I summarize the response from the API, and I implement paging, I get 9 pages, but only one specifies files:
According to the docs for comparison, "The list of changed files is only shown on the first page of results, but it includes all changed files for the entire comparison"