Skip to content

Commit 405e545

Browse files
authored
feat: delete comment (#272)
1 parent 6e555c5 commit 405e545

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pullrequests.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ func (p *PullRequests) UpdateComment(co *PullRequestCommentOptions) (interface{}
156156
return p.c.execute("PUT", urlStr, data)
157157
}
158158

159+
func (p *PullRequests) DeleteComment(co *PullRequestCommentOptions) (interface{}, error) {
160+
urlStr := p.c.requestUrl("/repositories/%s/%s/pullrequests/%s/comments/%s", co.Owner, co.RepoSlug, co.PullRequestID, co.CommentId)
161+
return p.c.execute("DELETE", urlStr, "")
162+
}
163+
159164
func (p *PullRequests) GetComments(po *PullRequestsOptions) (interface{}, error) {
160165
urlStr := p.c.GetApiBaseURL() + "/repositories/" + po.Owner + "/" + po.RepoSlug + "/pullrequests/" + po.ID + "/comments/"
161166
return p.c.executePaginated("GET", urlStr, "", nil)

0 commit comments

Comments
 (0)