Azure-devops-cli-extension: Command to get the builds for a Pull Request

Created on 12 Dec 2017  路  2Comments  路  Source: Azure/azure-devops-cli-extension

Right now I'm having to filter all of the builds in the list by the value of system.pullRequest.pullRequestId in the parameters section of build results in order to find the builds associated with a Pull Request. Is this the right way to do this? I'd love if the PR information from `vsts code pr list' included build ids associated with the PR.

Perhaps it does or can and I'm just not seeing it.

question

Most helpful comment

One thing you can do is see the policies associated with your pull request, which includes build ids and status along with other ploicies:

For example:
vsts code pr policies list --id 100

You can then filter out non-build policies using the --query option if you only want to see builds. This does not however include builds that were associated with your pr but are not associated by a PR policy.

All 2 comments

One thing you can do is see the policies associated with your pull request, which includes build ids and status along with other ploicies:

For example:
vsts code pr policies list --id 100

You can then filter out non-build policies using the --query option if you only want to see builds. This does not however include builds that were associated with your pr but are not associated by a PR policy.

Awesome, that's got the data I needed!

Was this page helpful?
0 / 5 - 0 ratings