Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

"GET /repos/{owner}/{repo}/commits/{ref}" can paginate the "files" property #155

Copy link
Copy link
@gr2m

Description

@gr2m
Issue body actions

See https://docs.github.com/en/rest/reference/repos#get-a-commit

If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.

It's an odd case. Only the "files" key array will be paginated, but unlike the other endpoints that paginate that return an object instead of an array, this one will include lots of other keys. I'm not sure if that case is covered by https://github.com/octokit/plugin-paginate-rest.js/blob/92ed1aab99fe8045fe2c23b21308390471d0c8f5/src/normalize-paginated-list-response.ts

If someone would like to give this a go, I'd be happy to advice. Comment below if you have any questions. The first step would be to add a test to https://github.com/octokit/plugin-paginate-rest.js/blob/master/test/paginate.test.ts, then start a pull request. We can continue the discussion there

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueGood for contributors new to OctokitGood for contributors new to OctokitStatus: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: FeatureNew feature or requestNew feature or request

    Projects

    Status

    🔥 Backlog
    Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.