The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to reply to a pull request comment via Bitbucket API 2.0? If so, how?

Steve Muskiewicz
Contributor
April 2, 2019

Related to this question, I am using the Bitbucket 2.0 API to post a new pull request comment, but it is not clear (to me at least) how/if I can make the new comment a reply to a previous comment.

I have tried adding

 { "parent": { "id": <commentID> } }

and (what used to work in API 1.0)

{ "comment_id": <commentID> }

to my JSON data but both of these when done via CURL give me a response such as:

{"type": "error", "error": {"fields": {"content": "required key not provided",
"{ \"content\": { \"raw\": \"This is a reply comment\" }, \"parent\": { \"id\": \"NNNNNNNN\" }}":
"extra keys not allowed"}, "message": "Bad request"}}

I would think that the first example should work since if I query a PR comment that is a reply comment, the API shows it as having a parent.id key.

If there is some other required key then the error response isn't very helpful about what that should be.  And the API docs really offer no clue as to where the parent comment ID needs to be specified in the request body.

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events