From 139935b76ea3f3031ffb2feb99b4ac1af93a79c6 Mon Sep 17 00:00:00 2001 From: Joel Timothy Oh Date: Fri, 26 Jul 2024 16:25:25 +0000 Subject: [PATCH] Feature (generate): Add additional matches for commit categories --- ...anges-HashSubject-NoMerges-Categorized.ps1 | 59 ++++++++++++++----- ...HashSubject-NoMerges-CategorizedSorted.ps1 | 59 ++++++++++++++----- ...HashSubjectAuthor-NoMerges-Categorized.ps1 | 59 ++++++++++++++----- ...bjectAuthor-NoMerges-CategorizedSorted.ps1 | 59 ++++++++++++++----- ...nDate-HashSubject-NoMerges-Categorized.ps1 | 59 ++++++++++++++----- ...HashSubject-NoMerges-CategorizedSorted.ps1 | 59 ++++++++++++++----- ...HashSubjectAuthor-NoMerges-Categorized.ps1 | 59 ++++++++++++++----- ...bjectAuthor-NoMerges-CategorizedSorted.ps1 | 59 ++++++++++++++----- ...rsionDate-Subject-NoMerges-Categorized.ps1 | 59 ++++++++++++++----- ...ate-Subject-NoMerges-CategorizedSorted.ps1 | 59 ++++++++++++++----- ...ate-SubjectAuthor-NoMerges-Categorized.ps1 | 59 ++++++++++++++----- ...bjectAuthor-NoMerges-CategorizedSorted.ps1 | 59 ++++++++++++++----- 12 files changed, 516 insertions(+), 192 deletions(-) diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 index f53fc40..5087d12 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 @@ -25,48 +25,72 @@ function Changes-HashSubject-NoMerges-Categorized { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function Changes-HashSubject-NoMerges-Categorized { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^[0-9a-f]+ (\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -88,18 +112,21 @@ function Changes-HashSubject-NoMerges-Categorized { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ($_ -match "^[0-9a-f]+ (\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $_ "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 index ae9df5c..459d8fe 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 @@ -25,48 +25,72 @@ function Changes-HashSubject-NoMerges-CategorizedSorted { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function Changes-HashSubject-NoMerges-CategorizedSorted { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^[0-9a-f]+ (\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -106,18 +130,21 @@ function Changes-HashSubject-NoMerges-CategorizedSorted { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCategorizedCustomCollection | Sort-Object -Property Subject | % { - if ("$($_.Ref) $($_.Subject)" -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ("$($_.Ref) $($_.Subject)" -match "^[0-9a-f]+ (\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $($_.Ref) $($_.Subject) "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 index 41b2869..e03d1a3 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 @@ -25,48 +25,72 @@ function Changes-HashSubjectAuthor-NoMerges-Categorized { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function Changes-HashSubjectAuthor-NoMerges-Categorized { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^[0-9a-f]+ (\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -88,18 +112,21 @@ function Changes-HashSubjectAuthor-NoMerges-Categorized { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ($_ -match "^[0-9a-f]+ (\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $_ "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 index 5e10336..0086f27 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 @@ -25,48 +25,72 @@ function Changes-HashSubjectAuthor-NoMerges-CategorizedSorted { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function Changes-HashSubjectAuthor-NoMerges-CategorizedSorted { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^[0-9a-f]+ (\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -108,18 +132,21 @@ function Changes-HashSubjectAuthor-NoMerges-CategorizedSorted { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCategorizedCustomCollection | Sort-Object -Property Subject | % { - if ("$($_.Ref) $($_.Subject) $($_.Author)" -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ("$($_.Ref) $($_.Subject) $($_.Author)" -match "^[0-9a-f]+ (\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $($_.Ref) $($_.Subject) $($_.Author) "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 index 85b813e..b242827 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 @@ -25,48 +25,72 @@ function VersionDate-HashSubject-NoMerges-Categorized { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function VersionDate-HashSubject-NoMerges-Categorized { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^[0-9a-f]+ (\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -88,18 +112,21 @@ function VersionDate-HashSubject-NoMerges-Categorized { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ($_ -match "^[0-9a-f]+ (\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $_ "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 index f2cc33d..27e25c2 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 @@ -25,48 +25,72 @@ function VersionDate-HashSubject-NoMerges-CategorizedSorted { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function VersionDate-HashSubject-NoMerges-CategorizedSorted { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^[0-9a-f]+ (\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -106,18 +130,21 @@ function VersionDate-HashSubject-NoMerges-CategorizedSorted { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCategorizedCustomCollection | Sort-Object -Property Subject | % { - if ("$($_.Ref) $($_.Subject)" -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ("$($_.Ref) $($_.Subject)" -match "^[0-9a-f]+ (\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $($_.Ref) $($_.Subject) "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 index 63c6477..b906bb0 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 @@ -25,48 +25,72 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^[0-9a-f]+ (\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -88,18 +112,21 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ($_ -match "^[0-9a-f]+ (\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $_ "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 index 401159d..ec6213e 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 @@ -25,48 +25,72 @@ function VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^[0-9a-f]+ (\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^[0-9a-f]+ (\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -108,18 +132,21 @@ function VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCategorizedCustomCollection | Sort-Object -Property Subject | % { - if ("$($_.Ref) $($_.Subject) $($_.Author)" -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ("$($_.Ref) $($_.Subject) $($_.Author)" -match "^[0-9a-f]+ (\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $($_.Ref) $($_.Subject) $($_.Author) "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 index 05664cb..ad24a04 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 @@ -25,48 +25,72 @@ function VersionDate-Subject-NoMerges-Categorized { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function VersionDate-Subject-NoMerges-Categorized { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^(\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^(\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -88,18 +112,21 @@ function VersionDate-Subject-NoMerges-Categorized { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { - if ($_ -match "^(\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ($_ -match "^(\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $_ "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 index fc11134..9cd556f 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 @@ -25,48 +25,72 @@ function VersionDate-Subject-NoMerges-CategorizedSorted { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function VersionDate-Subject-NoMerges-CategorizedSorted { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^(\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^(\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -104,18 +128,21 @@ function VersionDate-Subject-NoMerges-CategorizedSorted { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCategorizedCustomCollection | Sort-Object -Property Subject | % { - if ("$($_.Subject)" -match "^(\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ("$($_.Subject)" -match "^(\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $($_.Subject) "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 index 85b646b..301c190 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 @@ -25,48 +25,72 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^(\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^(\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -88,18 +112,21 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { - if ($_ -match "^(\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ($_ -match "^(\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $_ "@ + break + } } } } diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 index 954349d..2e1ff71 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 @@ -25,48 +25,72 @@ function VersionDate-SubjectAuthor-NoMerges-CategorizedSorted { $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } $commitHistoryCategory = @( @{ - Name = 'Breaking' Title = 'Breaking' + Name = @( + 'Breaking' + 'breaking-change' + ) } @{ - Name = 'Feature' Title = 'Features' + Name = @( + 'Feature' + 'feat' + ) } @{ - Name = 'Enhancement' Title = 'Enhancements' + Name = @( + 'Enhancement' + ) } @{ - Name = 'Change' Title = 'Change' + Name = @( + 'Change' + ) } @{ - Name = 'Refactor' Title = 'Refactors' + Name = @( + 'Refactor' + ) } @{ - Name = 'CI' Title = 'CI' + Name = @( + 'CI' + ) } @{ - Name = 'Test' Title = 'Tests' + Name = @( + 'Test' + ) } @{ - Name = 'Fix' Title = 'Fixes' + Name = @( + 'Fix' + ) } @{ - Name = 'Style' Title = 'Style' + Name = @( + 'Style' + ) } @{ - Name = 'Docs' Title = 'Documentation' + Name = @( + 'Docs' + ) } @{ - Name = 'Chore' Title = 'Chore' + Name = @( + 'Chore' + ) } ) $commitHistoryCategoryNone = @{ @@ -75,7 +99,7 @@ function VersionDate-SubjectAuthor-NoMerges-CategorizedSorted { $commitHistoryCategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryUncategorizedCollection = New-Object System.Collections.ArrayList $commitHistoryCollection | % { - if ($_ -match "^(\s*\w+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if ($_ -match "^(\s*[a-zA-Z0-9_\-]+\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { $commitHistoryCategorizedCollection.Add($_) > $null }else { $commitHistoryUncategorizedCollection.Add($_) > $null @@ -106,18 +130,21 @@ function VersionDate-SubjectAuthor-NoMerges-CategorizedSorted { foreach ($c in $commitHistoryCategory) { $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCategorizedCustomCollection | Sort-Object -Property Subject | % { - if ("$($_.Subject) $($_.Author)" -match "^(\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { - if (!$iscommitHistoryCategoryTitleOutputted) { + foreach ($n in $c['Name']) { + if ("$($_.Subject) $($_.Author)" -match "^(\s*$n\s*)(\(\s*[a-zA-Z0-9_\-\/]+\s*\)\s*)*:(.+)") { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $iscommitHistoryCategoryTitleOutputted = $true - } + $iscommitHistoryCategoryTitleOutputted = $true + } @" * $($_.Subject) $($_.Author) "@ + break + } } } }