Project

General

Profile

Feature #5582

Add the version number of a PR in the HTTP API

Added by Olivier Renaud 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
15.01.2020
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:

Description

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

Also available in: Atom PDF