Skip to content

Make Commit.files return PaginatedList#2939

Merged
EnricoMi merged 8 commits intoPyGithub:mainfrom
iarspider:commit-files-paginated
May 28, 2024
Merged

Make Commit.files return PaginatedList#2939
EnricoMi merged 8 commits intoPyGithub:mainfrom
iarspider:commit-files-paginated

Conversation

@iarspider
Copy link
Copy Markdown
Contributor

@iarspider iarspider commented Apr 5, 2024

/commits/{ref} endpoint is paginated, meaning you can get up to 3000 files per commit:

Note: If there are more than 300 files in the commit diff and the default JSON media type is requested, 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.

As suggested here.

Fixes #1745.

@iarspider iarspider force-pushed the commit-files-paginated branch 3 times, most recently from 7974fbd to ba323d6 Compare April 5, 2024 11:12
@iarspider iarspider force-pushed the commit-files-paginated branch from 58f9d73 to 3d551bf Compare April 8, 2024 09:17
owner.avatar_url
self.assertEqual(raisedexp.exception.actual_value, 42)

def testBadTransformedAttributeInList(self):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of removing this test case, we should find a different object that returns a list of a class and use that to test the bad transform case.

Copy link
Copy Markdown
Collaborator

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@iarspider
Copy link
Copy Markdown
Contributor Author

Thanks!

@EnricoMi EnricoMi added this pull request to the merge queue May 28, 2024
Merged via the queue into PyGithub:main with commit fa885f0 May 28, 2024
@iarspider iarspider deleted the commit-files-paginated branch May 28, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

commit.files result has a limit of 300 files, can I get infomation of all files?

2 participants