diff --git a/github/review_test.go b/github/review_test.go index 3459956..0c1e4d3 100644 --- a/github/review_test.go +++ b/github/review_test.go @@ -2,9 +2,9 @@ package github import ( "context" - "fmt" "encoding/json" "errors" + "fmt" "io" "net/http" "strings" diff --git a/github/reviews.go b/github/reviews.go index b448d53..3e87dbc 100644 --- a/github/reviews.go +++ b/github/reviews.go @@ -221,6 +221,7 @@ func (c *Client) DeleteReview(ctx context.Context, owner, repo string, number in reqURL := fmt.Sprintf("%s/repos/%s/%s/pulls/%d/reviews/%d", c.baseURL, url.PathEscape(owner), url.PathEscape(repo), number, reviewID) + // nil body: the GitHub DELETE endpoint for reviews requires no request body. _, err := c.doRequestWithBody(ctx, http.MethodDelete, reqURL, nil) if err != nil { var apiErr *APIError