MethodsAndPractices / vsteam

PowerShell module for accessing Azure DevOps Services and Azure DevOps Server (formerly VSTS or TFS)
https://methodsandpractices.github.io/vsteam-docs/
MIT License
442 stars 155 forks source link

Add support for returning work items in Get-VSTeamGitCommit #530

Open halvarsson opened 1 year ago

halvarsson commented 1 year ago

Proposal

When retrieving commits using Get-VSTeamGitCommit, there is currently no way to see which work items are linked to the returned commits

It would be nice if the work item ids could be returned when calling the cmdlet, so its possible to lookup which work items are related to the commit

I can raise a PR for this if I get some clarification on how the work items should be returned :-)

Solved Problem

I have updated the module locally to return the work items, and I am currently using it to generate release notes between two tags for my branch. But it would be nice if this was supported out of the box in the module

I then iterate the linked work items and add tags to them, this allows me to get a good overview of which work items have no code associated to them, allowing me to manually describe these in release notes etc.

Additional info / code snippets?

The data can be returned by the API call that is currently being made, by passing 'searchCriteria.includeWorkItems' = $True This then returns the id + url

PS N:\> $commits[0].InternalObject.workItems

id   url                                                    
--   ---                                                    
1234 https://dev.azure.com/<org>/_apis/wit/workItems/1234