en-US/about_AzDoWIPTagHygiene.help.txt
|
.NAME
AzDoWIPTagHygiene .SYNOPSIS DSC resource that detects and corrects misaligned Azure DevOps work item tags. .DESCRIPTION A companion to AzDoWIPTags. Where that resource ensures a tag vocabulary exists, this one deals with the tags that accumulate beside it - 'Bugfix' next to 'Bug', 'frontend' next to 'Frontend', 'Tech-Debt' next to 'Tech Debt'. Correction is performed by renaming the misaligned tag to its canonical name. Azure DevOps merges the two tags and re-tags every affected work item, so a correction costs one API call per tag rather than one per work item. .PARAMETER ProjectName Key - System.String The name of the Azure DevOps project. .PARAMETER CanonicalTags Required - System.String[] The approved tag vocabulary. Usually the same list given to AzDoWIPTags. .PARAMETER Aliases Write - HashTable[] Explicit mappings applied regardless of threshold: @( @{ From = 'Bugfix'; To = 'Bug' } ) .PARAMETER MatchStrategy Write - System.String Allowed values: Exact, Fuzzy, Both 'Exact', 'Fuzzy' or 'Both'. Defaults to 'Exact'. .PARAMETER SimilarityThreshold Write - System.Int32 0-100. The minimum normalized similarity for a fuzzy match. Defaults to 85. .PARAMETER MinimumTagLength Write - System.Int32 Tags shorter than this are never fuzzy-matched. Defaults to 5. .PARAMETER ExcludedTags Write - System.String[] Tags that are never touched. .PARAMETER RemediationAction Write - System.String Allowed values: Report, Merge 'Report' (the default) detects and reports without changing anything. 'Merge' applies the corrections. .PARAMETER MaxAutoCorrections Write - System.Int32 A safety cap. If more misalignments are found than this, nothing is merged and the resource reports an error instead - a misconfigured vocabulary should not quietly rewrite a whole project. Defaults to 25. .EXAMPLE 1 This example reports misaligned work item tags without changing anything. This is the default behaviour. Test() returns $false when misalignments exist and Set() lists them as warnings, which makes the resource usable as a compliance check on its own. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoWIPTagHygiene 'ReportTagHygiene' { ProjectName = 'MyProject' CanonicalTags = @('Bug', 'Tech Debt', 'Frontend', 'Backend') RemediationAction = 'Report' } } } .EXAMPLE 2 This example corrects misaligned tags by merging them into the canonical vocabulary. A tag merge is irreversible and project-wide. Run with RemediationAction = 'Report' first and read the warnings before switching to 'Merge'. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoWIPTags 'Vocabulary' { ProjectName = 'MyProject' WorkItemTrackingTagList = @('Bug', 'Tech Debt', 'Frontend', 'Backend') } AzDoWIPTagHygiene 'MergeTagHygiene' { ProjectName = 'MyProject' CanonicalTags = @('Bug', 'Tech Debt', 'Frontend', 'Backend') Aliases = @( @{ From = 'Bugfix'; To = 'Bug' } @{ From = 'Defect'; To = 'Bug' } ) ExcludedTags = @('Sprint1', 'Sprint2') RemediationAction = 'Merge' DependsOn = '[AzDoWIPTags]Vocabulary' } } } .EXAMPLE 3 This example enables fuzzy matching to catch typos as well as case and punctuation differences. Fuzzy matching is a guess, so it is gated by SimilarityThreshold and MinimumTagLength, and it is worth running as a report first to see what it would do. Configuration Example { Import-DscResource -ModuleName 'AzureDevOpsDscNative' node localhost { AzDoWIPTagHygiene 'FuzzyTagHygiene' { ProjectName = 'MyProject' CanonicalTags = @('Frontend', 'Backend', 'Infrastructure') MatchStrategy = 'Both' SimilarityThreshold = 85 MinimumTagLength = 5 MaxAutoCorrections = 10 RemediationAction = 'Report' } } } |