|
|
|
@ -148,7 +148,7 @@ func (s *PullRequestsService) Edit(owner string, repo string, number int, pull * |
|
|
|
// ListCommits lists the commits in a pull request.
|
|
|
|
//
|
|
|
|
// GitHub API docs: https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request
|
|
|
|
func (s *PullRequestsService) ListCommits(owner string, repo string, number int, opt *ListOptions) (*[]Commit, *Response, error) { |
|
|
|
func (s *PullRequestsService) ListCommits(owner string, repo string, number int, opt *ListOptions) ([]Commit, *Response, error) { |
|
|
|
u := fmt.Sprintf("repos/%v/%v/pulls/%d/commits", owner, repo, number) |
|
|
|
u, err := addOptions(u, opt) |
|
|
|
if err != nil { |
|
|
|
@ -166,13 +166,13 @@ func (s *PullRequestsService) ListCommits(owner string, repo string, number int, |
|
|
|
return nil, resp, err |
|
|
|
} |
|
|
|
|
|
|
|
return commits, resp, err |
|
|
|
return *commits, resp, err |
|
|
|
} |
|
|
|
|
|
|
|
// ListFiles lists the files in a pull request.
|
|
|
|
//
|
|
|
|
// GitHub API docs: https://developer.github.com/v3/pulls/#list-pull-requests-files
|
|
|
|
func (s *PullRequestsService) ListFiles(owner string, repo string, number int, opt *ListOptions) (*[]CommitFile, *Response, error) { |
|
|
|
func (s *PullRequestsService) ListFiles(owner string, repo string, number int, opt *ListOptions) ([]CommitFile, *Response, error) { |
|
|
|
u := fmt.Sprintf("repos/%v/%v/pulls/%d/files", owner, repo, number) |
|
|
|
u, err := addOptions(u, opt) |
|
|
|
if err != nil { |
|
|
|
@ -190,7 +190,7 @@ func (s *PullRequestsService) ListFiles(owner string, repo string, number int, o |
|
|
|
return nil, resp, err |
|
|
|
} |
|
|
|
|
|
|
|
return commitFiles, resp, err |
|
|
|
return *commitFiles, resp, err |
|
|
|
} |
|
|
|
|
|
|
|
// IsMerged checks if a pull request has been merged.
|
|
|
|
|