Team Foundation 服務器上變更集註釋的位置? (Location of changeset comments on a Team Foundation server?)


問題描述

Team Foundation 服務器上變更集註釋的位置? (Location of changeset comments on a Team Foundation server?)

One of my colleagues is working on a Continuous Integration build script that makes a new build every time a developer makes a checkin, and sends an email out to the development team when the build finishes. We want to take any comments associated with the checkin (the same comments you'd see by right-clicking on a project file and selecting View History) and include them in the email. However, we're not sure where in the back-end of TFS to point the script so it can retrieve those comments. Does anyone know where we should look?


參考解法

方法 1:

Are you using TFS API for that?  If so, you simply do:

<pre class="lang-cs prettyprint-override">TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer("http://WhateverServerUrl");
IBuildServer buildServer = (IBuildServer)tfs.GetService(typeof(IBuildServer));
VersionControlServer VsServer = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
IBuildDetail build = buildServer.GetAllBuildDetails(new Uri("http://WhateverBuildUrl"));

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

foreach (IChangesetSummary changeSetData in associatedChangesets)
{
    Changeset changeSet = VsServer.GetChangeset(changeSetData.ChangesetId);
    string x = changeSet.Comment;

</code></pre>

If you are trying to look it up in the DB, you can look at the changeset title:

<pre class="lang-sql prettyprint-override">USE tfs_warehouse SELECT [ChangesetID]       ,[ChangesetTitle]   FROM [tfs_warehouse].[dbo].[DimChangeset] </pre>

From here add a where clause to either the id, date etc.

This is where that data is stored in TFS 2010.

In TFS 2008, you would use TfsWarehouse and look at dbo.ChangeSet Changset column.

(by estanfordMike Veigel)

參考文件

  1. Location of changeset comments on a Team Foundation server? (CC BY-SA 3.0/4.0)

#continuous-integration #tfsbuild #tfs






相關問題

持續集成中的數據庫變更管理 (Database change management in continuous integration)

Jenkins 全天運行構建和測試 (Jenkins running builds and tests all day long)

Visual Studio Online Build - Visual Studio SDK 和 Modellng SDK (Visual Studio Online Build - Visual Studio SDK and Modellng SDK)

從長遠來看,在 Hudson 和 CruiseControl 之間進行選擇 (Choosing between Hudson and CruiseControl for the long term)

整合兩個數據集...幫助! (Integrating two datasets... Help!)

Hudson 的替代構建經理 (Alternative build manager to Hudson)

帶 VSS 的 CruiseControl - 檢查所有文件 (CruiseControl with VSS - checks all files)

Team Foundation 服務器上變更集註釋的位置? (Location of changeset comments on a Team Foundation server?)

如果作業被取消,Concourse 會阻止後台進程停止 (Concourse prevent background processes from being stopped if job is canceled)

誰應該編寫 dockerfile、SRE 或開發人員? (Who should write the dockerfile, SRE or developer?)

Drone CI/CD 只停留在 exec 管道中 (Drone CI/CD only stuck in exec pipeline)

gitlab-ci:排除來自特定分支的合併請求 (gitlab-ci: exclude merge requests from specific branch)







留言討論