How do you programmatically make a comment (preferrably with Python) on a pull request hosted on Bitbucket?
I have a Buildbot server continuously running tests on all my branches hosted on Bitbucket, and after it runs tests for a branch, I want it to check for any pending pull requests and automatically create a comment noting test status (e.g. pass/fail).
This and this indicate Bitbucket has a pretty rich API, and even has methods for listing comments, but I can't find any method for creating a comment on a pull request.
According to 1.0 API documentation :
POST a new comment Creates a new comment on an request using the specified content data. The caller must be authenticated and have access to the repository to create an request. POST https://api.bitbucket.org/1.0/repositories/{accountname}/{repo_slug}/pullrequests/{pull_request_id}/comments --data "content=string"
Sample for --data is available in above location.
Also, according to this SO answer API 2.0 only supports reading of pull request comments and API 1.0 needs to be used to manipulate them.