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

夙愿已清 提交于 2019-12-22 03:19:21

问题


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?


回答1:


Unfortunately pull request comments are currently read-only in 2.0. We are definitely keen to finish that API, but these efforts have been rather under prioritized.

For now, 1.0 remains the only way to mutate PR comments.

Also see: https://answers.atlassian.com/questions/32977327/are-you-planning-on-offering-an-update-pull-request-comment-api




回答2:


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


来源:https://stackoverflow.com/questions/34185166/how-do-i-post-a-pull-request-comment-using-bitbucket-rest-api-2-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!