How to add comment to Pull Request in Stash REST API? REST API Browser doesn't help.
Hi nfx,
Yeah I'm afraid our REST documentation is lacking at the moment. We are looking to update them in an upcoming release.
To add a comment via REST:
http://host:port/rest/api/latest/projects/$PROJECT/repos/$REPO/pull-requests/$PR/comments
curl -X POST -d '{"text":"your comment"}' $URL
Or if you're replying
curl -X POST -d '{"text":"your comment","parent":{"id":1061}}' $URL
I hope this helps,
Charles
Hello Charles,
I've already figured that out. Somehow. But thank you
Btw, Rest Api Browser when used with parameters that are already in URL is totally unusable for playing with API. would you fix that someday?)
As I said - we are looking to improve the REST documentation this year. The REST browser will updated alongside Stash as new versions are released.
I tried this but comments not updated in Bitbucket cloud. There is none of the message displayed and no error.
Used 2.0 api, the GET comments works fine.
-Kannan
It looks like you're new here. Sign in or register to get started.