bitbucket-api

How do I post a pull request comment using BitBucket REST api 2.0?


Using REST API 1.0, I can do the following

POST /api/1.0/repositories/{owner}/{repo}/pullrequests/1/comments

What is the equivalent of this in 2.0? 2.0 documentation for pullrequests resource states "Finally, you can use this resource to manage the comments on a pull request as well." I don't see a POST for comments similar to 1.0 companion; nor does PUT do anything about comments.

Is posting comments on a PR supported in 2.0?


Solution

  • I know it has been quite a long time since the question was asked, but for people coming to this post:

    Bitbucket finally added a way to post comments using their 2.0 API. You check the documentation for more info.

    And here is an example:

    curl -X POST -d '{"content": { "raw": "your comment" }}' $URL