Add the version number of a PR in the HTTP API
The JSON response of
get_pull_request does not include the version number of the pull request (the one that gets incremented when a PR is updated with new commits). It would be a useful information to report in my use case (writing a bot that acts as a PR reviewer for TeamCity builds).
Using the Python api, I can find the version number with this code, but there is no workaround when working with the HTTP API.
pr = PullRequest.get(pr_id) pr_version = pr.versions.count() + 1