Skip to content

Commit 295f7fb

Browse files
committed
Add GetCommits and rename GetCommit to GetByCommit
Signed-off-by: Aria Vesta <avesta@marq.com>
1 parent 4a0c610 commit 295f7fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pullrequests.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@ func (p *PullRequests) Update(po *PullRequestsOptions) (interface{}, error) {
2727
return p.c.execute("PUT", urlStr, data)
2828
}
2929

30-
func (p *PullRequests) GetCommit(po *PullRequestsOptions) (interface{}, error) {
30+
func (p *PullRequests) GetByCommit(po *PullRequestsOptions) (interface{}, error) {
3131
urlStr := p.c.GetApiBaseURL() + "/repositories/" + po.Owner + "/" + po.RepoSlug + "/commit/" + po.Commit + "/pullrequests/"
3232
return p.c.executePaginated("GET", urlStr, "", nil)
3333
}
3434

35+
func (p *PullRequests) GetCommits(po *PullRequestsOptions) (interface{}, error) {
36+
urlStr := p.c.GetApiBaseURL() + "/repositories/" + po.Owner + "/" + po.RepoSlug + "/pullrequests/" + po.ID + "/commits/"
37+
return p.c.executePaginated("GET", urlStr, "", nil)
38+
}
39+
3540
func (p *PullRequests) Gets(po *PullRequestsOptions) (interface{}, error) {
3641
urlStr := p.c.GetApiBaseURL() + "/repositories/" + po.Owner + "/" + po.RepoSlug + "/pullrequests/"
3742

0 commit comments

Comments
 (0)