-
Suggestion
-
Resolution: Unresolved
-
None
-
None
The Atlassian Developer API documentation needs modification in the REST API for Add pull request comment and should have the "fromHash" as a mandatory field. The POST query will look something like this:
curl -X POST -H 'content-type: application/json' --user "admin" <Bitbucket-URL>/rest/api/1.0/projects/<project-key>/repos/<repo-slug>/pull-requests/<pullrequestID>/comments -d '{"text": "test comment for pull request number 2", "anchor": {"path": "README.md", "line": 1, "fileType": "TO", "diffType": "COMMIT", "fromHash": "0971bc30ebe509f7c71d35239cd7f62909f97eab", "toHash": "16ac6cd895bcc841256ccd5e05fdd70b66ae5d66"}}'
Not adding this actually breaks the Bitbucket UI. The Pull request Overview page shows the error message:
This page couldn't be displayed
Try reloading the page