Skip to content

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

@halvarsson

Description

@halvarsson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovements that do not include new featuresfeature requestfor new feature requests that do not just improve things

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions