Missing parameter in api 2.0 - pull request comment dest_rev or base_rev

Issue #18549 new
Tyler Mann created an issue

In the 1.0 version of the comment API you are able to specify the commit sha or revision to "anchor" a comment to when posting inline comments using the "dest_rev", "base_rev", and "anchor" keys. This is still not possible in version 2.0 of the API as far as the documentation says and we have tested, which makes the API impossible to use for a robust integration. This seems like a major loss of functionality that will render our application very unreliable and in some cases unusable to customers when 1.0 API support is removed. All other code providers we have integrated with support this functionality (github, gitlab, bitbucket server, bitbucket cloud 1.0 APIs etc).

Without knowing which revision your comment will get posted to, the line number and path could be pointing to the wrong place since each revision/commit can change the underlying code. It seems like the current behavior is to just use the latest commit on a PR with this API, but given the async nature of bitbucket it is impossible for the caller to reliably and robustly know what will be the latest revision is on the pull request since it may have changed since you last checked it even if checking immediately before posting. However it also makes it so a client/consumer of the API can't post comments if there has been a change since they started referencing a line on a file.

Similarly in the listing 2.0 API for pull request comments, we can't get this revision any way except by parsing the href link which is somewhat unfortunate but it does at least work for now.

Comments (0)

  1. Log in to comment