Reputation: 51
I would like to search for tfs changeset comment in visual studio 2017. Any way or tools except "View history and copy all to excel and search"?
Thanks.
Upvotes: 3
Views: 2826
Reputation: 885
Update for us people still using TFS: use the VS 2017 Extension "Find Changeset By Comment 2017" https://marketplace.visualstudio.com/items?itemName=TheDan.FindChangesetByComment
Then you get this right-click menu item in Source Control Explorer:
Upvotes: 4
Reputation: 30362
Try below PowerShell script, just replace the search text 07
as your own
behind 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
If you are using VS client, you can also use below extensions to search with comments:
Upvotes: 0