Skip to content

Commit

Permalink
feat: delete comment (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachsmith1 authored Feb 13, 2024
1 parent 6e555c5 commit 405e545
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pullrequests.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ func (p *PullRequests) UpdateComment(co *PullRequestCommentOptions) (interface{}
return p.c.execute("PUT", urlStr, data)
}

func (p *PullRequests) DeleteComment(co *PullRequestCommentOptions) (interface{}, error) {
urlStr := p.c.requestUrl("/repositories/%s/%s/pullrequests/%s/comments/%s", co.Owner, co.RepoSlug, co.PullRequestID, co.CommentId)
return p.c.execute("DELETE", urlStr, "")
}

func (p *PullRequests) GetComments(po *PullRequestsOptions) (interface{}, error) {
urlStr := p.c.GetApiBaseURL() + "/repositories/" + po.Owner + "/" + po.RepoSlug + "/pullrequests/" + po.ID + "/comments/"
return p.c.executePaginated("GET", urlStr, "", nil)
Expand Down

0 comments on commit 405e545

Please sign in to comment.