fix(github): consolidate review.go and identity.go into reviews.go (#116) #119
@@ -2,9 +2,9 @@ package github
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
||||
"fmt"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"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",
|
||||
|
sonnet-review-bot
commented
[NIT] The comment **[NIT]** The comment `// nil body: the GitHub DELETE endpoint for reviews requires no request body.` was removed in the diff. It was a useful clarification for why nil is passed to doRequestWithBody. Consider retaining it or replacing with an equivalent inline comment.
|
||||
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
|
||||
|
||||
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.