skip to Main Content

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


  1. GetPullRequest 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.

    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-

    enter image description here
    enter image description here
    enter image description here

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search