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
GetCommit returns only the first page of a commit's files #240
GetCommit returns a Commit whose files holds only the first page of the commit's changed files. GitHub's single-commit endpoint pages the files array and says so in a Link header: GET /repos/ponylang/github_rest_api/commits/ca84d1c?per_page=1 returns one file and rel="next" up to page=10, and the same commit without per_page returns all 10. GitHub's default page holds 300 files, so a commit that changes more than that comes back with a partial files list and nothing to say more exist. GetCommit uses JSONRequester, which drops the Link header.
This is the same truncation #221 fixes for issue comments and pull request files, but the shape is different: the response is one commit object with a paged list inside it, not a list of objects. Fixing it needs a way to fetch the rest of files, which changes the public Commit or GetCommit API.
Activity