视觉工作室2017搜索tfs变更评论

问题描述 投票:2回答:2

我想在visual studio 2017中搜索tfs changeset评论。除了“查看历史记录并将所有内容复制到excel和搜索”之外的任何方式或工具?

谢谢。

visual-studio tfs comments changeset
2个回答
0
投票

尝试下面的PowerShell脚本,只需将搜索文本07替换为like '*07*'背后的自己

$baseUrl = "http://server:8080/tfs/DefaultCollection/_apis/tfvc/changesets?maxCommentLength=30&api-version=1.0"         
$changesets = (Invoke-RestMethod -Uri $baseUrl -Method Get -UseDefaultCredential).value|where({$_.comment -like '*07*'})

$changesetResults = @()

foreach($changeset in $changesets){

    $customObject = new-object PSObject -property @{
          "changesetId" = $changeset.changesetId
          "author" = $changeset.author.uniqueName
          "checkedInBy" = $changeset.checkedInBy.uniqueName
          "createdDate" = $changeset.createdDate
          "comment" = $changeset.comment
        } 

    $changesetResults += $customObject      
}

$changesetResults | Select `
                changesetId, 
                author, 
                checkedInBy,
                createdDate,
                comment #|export-csv -Path C:\Changesets.csv -NoTypeInformation

enter image description here


如果您使用的是VS客户端,还可以使用以下扩展名来搜索评论:


1
投票

对于仍在使用TFS的人们的更新:使用VS 2017扩展“查找2017年评论的变更集”https://marketplace.visualstudio.com/items?itemName=TheDan.FindChangesetByComment

然后,您在Source Control Explorer中获得此右键单击菜单项:enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.