我希望查询GIT提交以获取与特定提交相关的工作项ID。 (https://www.visualstudio.com/en-us/docs/integrate/api/git/commits)
在上面的响应中,属性“commentTruncated”被设置为true。我已经阅读了文档,但没有找到获取完整评论或相关工作项的解决方案。
请求:
http://{server}/tfs/{collection}/{git repository}/_apis/git/repositories/{repository name}/commits?api-version=1.0
很不幸,它返回被截断的评论,因此有时不能看到工作项ID(#{Work Item ID})。
{
"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"
}]
}
在上面的响应中,属性“commentTruncated”被设置为true。我已经阅读了文档,但没有找到获取完整评论或相关工作项的解决方案。