Skip to content

Modified the fetch_patch function to handle responses with more than one page of data#20

Merged
hestonhoffman merged 1 commit into
hestonhoffman:mainfrom
katherine-hough:pagination_handling
Jun 25, 2025
Merged

Modified the fetch_patch function to handle responses with more than one page of data#20
hestonhoffman merged 1 commit into
hestonhoffman:mainfrom
katherine-hough:pagination_handling

Conversation

@katherine-hough

Copy link
Copy Markdown
Contributor

Fixes Issue #19

Modified the fetch_patch function to handle responses with more than one page of data to ensure that all files modified in a PR are collected.

For more information on pagination in the GitHub REST API see:
https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28

@hestonhoffman hestonhoffman left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the contribution! Definitely an oversight on my part! I was a little worried about handling potential rate limiting here, but I tested it on a couple of huge PRs and I think it's okay as long as users aren't using it in huge repos with lots of large PRs. I can always come back and handle that later if it becomes an issue.

I'm going to go ahead and merge this in. I'll come back later and cut a release.

@hestonhoffman hestonhoffman merged commit 1027092 into hestonhoffman:main Jun 25, 2025
2 checks passed
@katherine-hough

Copy link
Copy Markdown
Contributor Author

I think that the number of API requests can be reduced slightly for large PRs by increasing the number of items per page (https://docs.github.com/en/rest/using-the-rest-api/using-pagination-in-the-rest-api?apiVersion=2022-11-28#changing-the-number-of-items-per-page)?

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.

2 participants