Skip to content

Use GitHub files API with pagination for PR diff#1491

Merged
manicmaniac merged 2 commits into
danger:masterfrom
timbaev:master
Jul 5, 2024
Merged

Use GitHub files API with pagination for PR diff#1491
manicmaniac merged 2 commits into
danger:masterfrom
timbaev:master

Conversation

@timbaev

@timbaev timbaev commented Jun 21, 2024

Copy link
Copy Markdown
Contributor

Used the same idea as in danger-js to get a list of files for PR diff using List pull requests files API from GitHub with pagination. The old Get a pull request API has a limit of 300 files and there is no pagination, which is why Danger can't leave an Inline comment with error 406 from the GitHub API.

Fixes #1489

@manicmaniac manicmaniac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good suggestion, thank you 👍

@manicmaniac

Copy link
Copy Markdown
Member

@timbaev Could you please add CHANGELOG entry before merging?

@manicmaniac manicmaniac self-requested a review June 26, 2024 00:52
@timbaev

timbaev commented Jun 28, 2024

Copy link
Copy Markdown
Contributor Author

@timbaev Could you please add CHANGELOG entry before merging?

No problem, thanks!

@manicmaniac manicmaniac merged commit 7beacab into danger:master Jul 5, 2024
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.

[bug] GitHub api request fails when PR diff is > 300 files

2 participants