diff --git a/bitbucket.go b/bitbucket.go index c7a4293..89d12e8 100644 --- a/bitbucket.go +++ b/bitbucket.go @@ -299,6 +299,7 @@ type PullRequestCommentOptions struct { PullRequestID string `json:"id"` Content string `json:"content"` CommentId string `json:"-"` + Parent *int `json:"parent"` } type IssuesOptions struct { diff --git a/pullrequests.go b/pullrequests.go index 55ec5b7..ca0e263 100644 --- a/pullrequests.go +++ b/pullrequests.go @@ -255,6 +255,12 @@ func (p *PullRequests) buildPullRequestCommentBody(co *PullRequestCommentOptions "raw": co.Content, } + if co.Parent != nil { + body["parent"] = map[string]interface{}{ + "id": co.Parent, + } + } + data, err := json.Marshal(body) if err != nil { return "", err