fix(github): readable API errors, normalised webhook review states, no REQUEST_CHANGES on the token's own PR
Errors say what GitHub refused in its own words instead of the request URL and an empty field list. Webhook review states arrive lower-case and were never normalised, so a webhook-delivered change request did not read as one. A review the token would post as REQUEST_CHANGES on its own pull request comments instead, which GitHub accepts. Secondary rate limits wait up to two minutes and retry.
This commit is contained in:
8 files changed
+196
-44
No files matched your search
@@ -31,7 +31,7 @@ func (c *GitHubClient) ParseWebhook(headers map[string]string, body []byte) (for
|
||||
PRNumber: e.GetPullRequest().GetNumber(),
|
||||
ReviewID: review.GetID(),
|
||||
Author: review.GetUser().GetLogin(),
|
||||
State: review.GetState(),
|
||||
State: normalizeReviewState(review.GetState()),
|
||||
Body: review.GetBody(),
|
||||
}}, nil
|
||||
case *github.PullRequestReviewCommentEvent:
|
||||
|
||||
Reference in new issue
Block a user