Skip to content

Commit be7ae07

Browse files
authored
feat: add comment parent id (#269)
* feat: add comment parent id * feat: add comment parent id
1 parent da461f2 commit be7ae07

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

bitbucket.go

+1
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ type PullRequestCommentOptions struct {
299299
PullRequestID string `json:"id"`
300300
Content string `json:"content"`
301301
CommentId string `json:"-"`
302+
Parent *int `json:"parent"`
302303
}
303304

304305
type IssuesOptions struct {

pullrequests.go

+6
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,12 @@ func (p *PullRequests) buildPullRequestCommentBody(co *PullRequestCommentOptions
255255
"raw": co.Content,
256256
}
257257

258+
if co.Parent != nil {
259+
body["parent"] = map[string]interface{}{
260+
"id": co.Parent,
261+
}
262+
}
263+
258264
data, err := json.Marshal(body)
259265
if err != nil {
260266
return "", err

0 commit comments

Comments
 (0)