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
The documentation for RepositoryCommitsClient.Compare function indicate that all files included in the compare are returned in the first paginated response. As far as I can tell, the maximum number of files returned is 300, which are returned in the first response, but there is no way to retrieve the remainder of the files for comparisons that include more than 300 files. Not sure if this is a bug or a limitation 'by design'.
Versions
Octokit.net version 7.1.0
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
So it might look something like in a loop or some sort of iteration:
var options = new ApiOptions
{
PageSize = 100,
PageCount = 1,
StartPage = 1
};
var commits = await client.Compare(string "owner", "repo_name", "base", "head", options);
Also, the REST API docs on comparing commits says the limit is 250. I'll let our docs folks know that you are seeing 300 so that we can get that corrected and up to date.
@nickfloyd I've seen the pagination thing in multiple responses on this issue across various GitHub-related repos, but from my testing, it seems that the pagination applies to commits, not files.
If you have a commit range with only 2 commits in it (which is under the 100 per page limit), but 5000 files:
page 1 will return 2 commits, and 300 max files
page 2 will return 0 commits, because there aren't more than 100, and 0 files
What happened?
The documentation for RepositoryCommitsClient.Compare function indicate that all files included in the compare are returned in the first paginated response. As far as I can tell, the maximum number of files returned is 300, which are returned in the first response, but there is no way to retrieve the remainder of the files for comparisons that include more than 300 files. Not sure if this is a bug or a limitation 'by design'.
Versions
Octokit.net version 7.1.0
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: