TFS GIT REST API retrieves associated commit work items

I want to request a GIT is committed to receiving associated work item identifiers associated with a specific commit. ( https://www.visualstudio.com/en-us/docs/integrate/api/git/commits )

Request:

http://{server}/tfs/{collection}/{git repository}/_apis/git/repositories/{repository name}/commits?api-version=1.0 

Unfortunately, it returns truncated comments, and because of this, it is not always possible to see the work item identifier (# {Work item identifier}).

 { "count": 100, "value": [{ "commitId": "commit hash", "author": { "name": "some name", "email": "some email", "date": "2016-12-12T14:29:28Z" }, "committer": { "name": "some name", "email": "some email", "date": "2016-12-12T14:29:28Z" }, "comment": "Merge branch 'someBranch' of something.", "commentTruncated": true, "changeCounts": { "Add": 5, "Edit": 34 }, "url": "url", "remoteUrl": "remoteUrl" }] } 

In the answer above, the "commentTruncated" property is set to true. I read the documentation, but did not find a solution to get the full comment or related work separately.

+5
source share
1 answer

Set the details of each commit, for example.

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/be67f8871a4d2c75f13a51c1d3c30ac0d74d4ef4?api-version=1.0

See Only the section in the documents.

+4
source

Source: https://habr.com/ru/post/1261177/


All Articles