fix(github): consolidate review.go and identity.go into reviews.go (#116) #119
@@ -2,9 +2,9 @@ package github
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
|||||||
"fmt"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|||||||
@@ -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",
|
reqURL := fmt.Sprintf("%s/repos/%s/%s/pulls/%d/reviews/%d",
|
||||||
c.baseURL, url.PathEscape(owner), url.PathEscape(repo), number, reviewID)
|
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)
|
_, err := c.doRequestWithBody(ctx, http.MethodDelete, reqURL, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
var apiErr *APIError
|
var apiErr *APIError
|
||||||
|
|||||||
Reference in New Issue
Block a user
[NIT] Import ordering:
fmtis listed beforeencoding/json, breaking the standard goimports ordering (stdlib imports should be alphabetical within their group). gofmt/goimports would reorder these. Minor since CI passes, but worth fixing for consistency with the style pattern.[NIT] Import ordering:
fmtis inserted beforeencoding/jsonbut goimports/gofmt would order stdlib imports alphabetically (context,encoding/json,errors,fmt,io,net/http,strings,testing). This is a minor style deviation thatgoimportswould fix automatically.