Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub API request fails silently #606

Closed
fabianehlert opened this issue Mar 26, 2024 · 3 comments
Closed

GitHub API request fails silently #606

fabianehlert opened this issue Mar 26, 2024 · 3 comments

Comments

@fabianehlert
Copy link

I'm using version 3.18.0 of danger-swift on Bitrise CI to analyze pull requests on GitHub via danger-swift ci --failOnErrors.

Since a couple of days ago, I've noticed that while the exit code of danger-swift still indicates a successful execution, the logs show that the GitHub API has responded with an error. This can be observed on pull requests with a diff of more than 300 files. However, reading the GitHub API docs, it seems that the file limit is set to 3000. And looking at older builds of my project, I can see that just a week ago, pull requests larger than 300 files would not show this error in the logs and danger-swift would properly annotate the pull request.

I couldn't find any noteworthy release notes mentioning a change of the file limit in the GitHub API. I hope you might have some ideas and I'm happy to share more specific details if needed. Thank you!

Here's the full log:

+ danger-swift ci --failOnErrors
Request failed [406]: https://api.github.com/repos/org/repo/pulls/id
Response: {
  "message": "Sorry, the diff exceeded the maximum number of files (300). Consider using 'List pull requests files' API or locally cloning the repository instead.",
  "errors": [
    {
      "resource": "PullRequest",
      "field": "diff",
      "code": "too_large"
    }
  ],
  "documentation_url": "https://docs.github.com/rest/pulls/pulls#list-pull-requests-files"
}
Found only messages, passing those to review.
@orta
Copy link
Member

orta commented Mar 26, 2024

Maybe GitHub changed the API limits?

@fabianehlert
Copy link
Author

Maybe GitHub changed the API limits?

I was thinking about that too but couldn't find any recent notes in this direction 🤔

@fabianehlert
Copy link
Author

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

No branches or pull requests

2 participants