Skip to content

Commit 4c313d0

Browse files
committed
feat: enhance comment bitbucket
1 parent 6325df9 commit 4c313d0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

internal/infrastructure/http/bitbucket/payload.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ package bitbucket
22

33
type PostPullRequestCommentRequest struct {
44
Content *PullRequestCommentContent `json:"content"`
5+
Inline *PullRequestCommentInline `json:"inline"`
56
}
67

78
type PullRequestCommentContent struct {
89
Raw string `json:"raw"`
910
}
1011

12+
type PullRequestCommentInline struct {
13+
Path string `json:"path"`
14+
}
15+
1116
type PullRequestResponse struct {
1217
CommentCount int64 `json:"comment_count"`
1318
TaskCount int64 `json:"task_count"`

internal/infrastructure/http/bitbucket/post_pull_request_comment.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ func (c *client) PostPullRequestComment(ctx context.Context, input domain.PostPu
1414
Content: &PullRequestCommentContent{
1515
Raw: input.Comment,
1616
},
17+
Inline: &PullRequestCommentInline{
18+
Path: input.Path,
19+
},
1720
}
1821
if err := c.doRequest(ctx, http.MethodPost, fmt.Sprintf("/pullrequests/%s/comments", input.PullRequestId), payload, &response); err != nil {
1922
return err

0 commit comments

Comments
 (0)