How to retrieve changesets associated with a build in TFS 2013 with Git?

前端 未结 3 1613
野趣味
野趣味 2021-01-20 06:17

Once you have an IBuildDetail getting the associated changsets used to be accomplished with:

buildDetail.Information.GetNodesByType(\"AssociatedChangeset\")
         


        
3条回答
  •  囚心锁ツ
    2021-01-20 06:58

    For those interested in getting the current builds list of associated commits (after associate commits since last good build is called) the following code is helpful.

    var envVar = context.GetExtension();           
    var commits = envVar.GetEnvironmentVariable>(context, WellKnownEnvironmentVariables.AssociatedCommits);
    

    This is nicer than the marked answer for the current build as you get back the type safe object.

提交回复
热议问题