通过API从WIT开发链接 [英] Development links from WIT via API

查看:97
本文介绍了通过API从WIT开发链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有没有办法通过API接收与工作项相关的提交?


祝你好运,

Jan

解决方案

你好Jan,


你可以做一个REST API调用URL类似于下面的工作项ID

 http:// yourtfs:8080 / tfs / yourcollection / _apis / wit / workitems? ids = yourworkitemid& 


expand = relations& api-version = 1.0

这将为您提供工作项的所有链接。您的Git提交和拉取请求将作为链接类型提供"ArtifactLink"


例如,下面的代码检索工作项,所有关系为"


WorkItemInIteration"

Hi,

is there any way how to receive commits associated with work item via API?

Best regards,
Jan

解决方案

Hi Jan,

You can do a REST API call to URL similar to below for the work item ID

http://yourtfs:8080/tfs/yourcollection/_apis/wit/workitems?ids=yourworkitemid&


expand=relations&api-version=1.0

This will give you all links of the work item. Your Git commits and pull requests will be available as link type "ArtifactLink"

For example below code retrieves work item with all relations to "


WorkItemInIteration".


这篇关于通过API从WIT开发链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆