According to the docs the GitPullRequest object should have a property called commits which is an array of GitCommitRef. Every time I hit the end point, I’m not getting this property. Is there something I should set to get this, or is the documentation wrong?
2
Answers
Please ensure, you have commits in your pull request. If you do then you will also get
GitCommitRef properties like commitId, _links, url etc.
in the response of your Get call.I am getting all the properties which are mentioned in this ms sample response body like below-
According to these docs, that property is not defined in the response. I would file an issue with their docs team and verify if that property was deprecated.
https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/get-pull-requests?view=azure-devops-rest-7.1&tabs=HTTP