0

团队建设大师的

我正在寻找构建邮件通知中包含的“关联变更集”列表

比如说,默认情况下我们会收到这样的构建通知,

Team Project:   Content Server
Build Number:   MerchantPortal_1.0.0707.69
Build Agent:    \Content Server\MerchantPortalBuildBox
Build Definition:   \Content Server\MerchantPortal QA
Build started by:   ENETDOM\jrichter
Build Start Time:   7/7/2009 8:25:30 AM
Build Finish Time:  7/7/2009 8:30:49 AM

Notes: 
- All dates and times are shown in GMT -05:00:00 Central Daylight Time
- You are receiving this notification because of a subscription created by ENETDOM\enbuild
Provided by Microsoft Visual Studio® Team System 2008

我真正想要的是一封包含更改的电子邮件。因此,用户不必单击 URL 来检索更改列表。所以......我希望邮件看起来像这样:

Team Project:   Content Server
Build Number:   MerchantPortal_1.0.0707.69
Build Agent:    \Content Server\MerchantPortalBuildBox
Build Definition:   \Content Server\MerchantPortal QA
Build started by:   ENETDOM\enbuild
Build Start Time:   7/7/2009 8:25:30 AM
Build Finish Time:  7/7/2009 8:30:49 AM


**Associated changesets:
482 DOMAIN\johny    Not needed...
486 DOMAIN\adam A final synchronization with SourceSafe files after the 15 december release.
487 DOMAIN\bob  Corrected the naught millenium bug....
488 DOMAIN\sarah    Reverted back to csproj file with SC changes....
Associated  work items:**
....


Notes: 
- All dates and times are shown in GMT -05:00:00 Central Daylight Time
- You are receiving this notification because of a subscription created by ENETDOM\enbuild
Provided by Microsoft Visual Studio® Team System 2008
4

2 回答 2

0

您可以使用以下代码获取关联的变更集:

TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(TeamFoundationServerUrl);
IBuildServer buildServer = (IBuildServer)tfs.GetService(typeof(IBuildServer));
IBuildDetail build = buildServer.GetAllBuildDetails(new Uri(BuildUri));

List<IChangesetSummary> assocChangesets = InformationNodeConverters.GetAssociatedChangesets(build);

您可以使用 Web 服务侦听构建并从 eventXml 读取 BuildUri。

于 2010-11-25T07:27:48.610 回答
0

据我所知,没有任何配置选项允许这样做。

如果您可以访问服务器,我认为有一种方法可以编写自定义代码,该代码挂钩到服务器上的事件系统,您可以构建自己的电子邮件格式。但我认为这将是很多工作。

我同意无法自定义电子邮件内容令人沮丧。

于 2010-05-05T20:32:59.597 回答