-
-
Notifications
You must be signed in to change notification settings - Fork 457
Description
We've started seeing several of our GitHub actions builds with reviewdog fail this morning because the GitHub API is returning a 406 error code on diffs larger than 3,000 lines. This seems to be new GitHub API behavior because the same version of reviewdog worked was passing on these same PRs three days ago.
The error message currently has no relevant Google results. Searching around on GitHub, I only find one mention of Code:too_large
with field: diff
anywhere, and it's from another reviewdog user today: platformsh/platformsh-docs#3885 (comment)
We've seen this both when running from actions like https://github.com/reviewdog/action-brakeman and from custom actions that invoke reviewdog manually.
An example reviewdog error when running with reviewdog -name=Hadolint -reporter=github-check -efm='%f:%l %m' -level=warning
:
reviewdog: post failed for Hadolint: fail to parse diff:
GET https://api.github.com/repos/thedyrt/<redacted>/pulls/<redacted>:
406 Sorry, the diff exceeded the maximum number of lines (3000)
[{Resource:PullRequest Field:diff Code:too_large Message:}]
The API response from GitHub:
{
"message": "Sorry, the diff exceeded the maximum number of lines (3000)",
"errors": [
{
"resource": "PullRequest",
"field": "diff",
"code": "too_large"
}
],
"documentation_url": "https://docs.github.com/rest/pulls/pulls#get-a-pull-request"
}