aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/pulls_comments.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/go-github/github/pulls_comments.go')
-rw-r--r--vendor/github.com/google/go-github/github/pulls_comments.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/github.com/google/go-github/github/pulls_comments.go b/vendor/github.com/google/go-github/github/pulls_comments.go
index c7af85a..51518f0 100644
--- a/vendor/github.com/google/go-github/github/pulls_comments.go
+++ b/vendor/github.com/google/go-github/github/pulls_comments.go
@@ -74,13 +74,13 @@ func (s *PullRequestsService) ListComments(owner string, repo string, number int
// TODO: remove custom Accept header when this API fully launches.
req.Header.Set("Accept", mediaTypeReactionsPreview)
- comments := new([]*PullRequestComment)
- resp, err := s.client.Do(req, comments)
+ var comments []*PullRequestComment
+ resp, err := s.client.Do(req, &comments)
if err != nil {
return nil, resp, err
}
- return *comments, resp, err
+ return comments, resp, nil
}
// GetComment fetches the specified pull request comment.
@@ -102,7 +102,7 @@ func (s *PullRequestsService) GetComment(owner string, repo string, number int)
return nil, resp, err
}
- return comment, resp, err
+ return comment, resp, nil
}
// CreateComment creates a new comment on the specified pull request.
@@ -121,7 +121,7 @@ func (s *PullRequestsService) CreateComment(owner string, repo string, number in
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// EditComment updates a pull request comment.
@@ -140,7 +140,7 @@ func (s *PullRequestsService) EditComment(owner string, repo string, number int,
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// DeleteComment deletes a pull request comment.