Hello, I’m hoping someone can help me be able to post inline comments on PR’s. In the UI version of Bitbucket, you can post a comment on a specific line, for example, line 6. (I’d share a screenshot but apparently new users can only include one media per post.) However, when I try to send a POST request to the API, it won’t do an inline comment. All I can get it to do so far is post the comment at the end, as shown in this screenshot, rather than on a specific line, like line 6:
The POST endpoint I’m using is (https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/pullrequests/6/comments)
and I’m sending the following information in body:
{
"content": {
"raw": "will this work on one line?"
},
"inline": {
"from": 6,
"to": 7,
"path": "style.css"
}
}
No matter what I put in the “from” and “to” it always puts the comment at the end, like in the screenshot, rather than inline, like it does in the UI. Does anyone have any suggestions for getting the POST request to do inline comments like the UI version allows?