From 804e426b15afafc1a0d4219ace3f2efae095147a Mon Sep 17 00:00:00 2001 From: Joel Timothy Oh Date: Fri, 31 May 2024 23:39:45 +0000 Subject: [PATCH] Refactor (generate): Improve namespacing of variables in categorized variants --- .../Changes-HashSubject-NoMerges-Categorized.ps1 | 10 +++++----- .../Changes-HashSubject-NoMerges-CategorizedSorted.ps1 | 10 +++++----- .../Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 | 10 +++++----- ...es-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 | 10 +++++----- .../VersionDate-HashSubject-NoMerges-Categorized.ps1 | 10 +++++----- ...sionDate-HashSubject-NoMerges-CategorizedSorted.ps1 | 10 +++++----- ...sionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 | 10 +++++----- ...te-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 | 10 +++++----- .../VersionDate-Subject-NoMerges-Categorized.ps1 | 10 +++++----- .../VersionDate-Subject-NoMerges-CategorizedSorted.ps1 | 10 +++++----- .../VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 | 10 +++++----- ...onDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 | 10 +++++----- 12 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 index 9ac92d2..bb4ac1b 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-Categorized.ps1 @@ -27,7 +27,7 @@ function Changes-HashSubject-NoMerges-Categorized { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -70,17 +70,17 @@ function Changes-HashSubject-NoMerges-Categorized { @" ## Changes "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + foreach ($c in $commitHistoryCategory) { + $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") { - if (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $_ diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 index ca040eb..2ca767b 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubject-NoMerges-CategorizedSorted.ps1 @@ -27,7 +27,7 @@ function Changes-HashSubject-NoMerges-CategorizedSorted { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -88,17 +88,17 @@ function Changes-HashSubject-NoMerges-CategorizedSorted { @" ## Changes "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + 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 (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $($_.Ref) $($_.Subject) diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 index 51cf22a..8259662 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-Categorized.ps1 @@ -27,7 +27,7 @@ function Changes-HashSubjectAuthor-NoMerges-Categorized { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -70,17 +70,17 @@ function Changes-HashSubjectAuthor-NoMerges-Categorized { @" ## Changes "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + foreach ($c in $commitHistoryCategory) { + $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") { - if (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $_ diff --git a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 index 6f7a6aa..3af486f 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/Changes-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 @@ -27,7 +27,7 @@ function Changes-HashSubjectAuthor-NoMerges-CategorizedSorted { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -90,17 +90,17 @@ function Changes-HashSubjectAuthor-NoMerges-CategorizedSorted { @" ## Changes "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + 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 (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $($_.Ref) $($_.Subject) $($_.Author) diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 index 7a343a2..db59c28 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-Categorized.ps1 @@ -27,7 +27,7 @@ function VersionDate-HashSubject-NoMerges-Categorized { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -70,17 +70,17 @@ function VersionDate-HashSubject-NoMerges-Categorized { @" ## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + foreach ($c in $commitHistoryCategory) { + $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") { - if (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $_ diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 index 79e8da9..03b14ba 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubject-NoMerges-CategorizedSorted.ps1 @@ -27,7 +27,7 @@ function VersionDate-HashSubject-NoMerges-CategorizedSorted { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -88,17 +88,17 @@ function VersionDate-HashSubject-NoMerges-CategorizedSorted { @" ## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + 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 (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $($_.Ref) $($_.Subject) diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 index 90fbdc6..487a763 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-Categorized.ps1 @@ -27,7 +27,7 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -70,17 +70,17 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized { @" ## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + foreach ($c in $commitHistoryCategory) { + $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { if ($_ -match "^[0-9a-f]+ (\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") { - if (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $_ diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 index f1ca8a7..b170fdf 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted.ps1 @@ -27,7 +27,7 @@ function VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -90,17 +90,17 @@ function VersionDate-HashSubjectAuthor-NoMerges-CategorizedSorted { @" ## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + 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 (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $($_.Ref) $($_.Subject) $($_.Author) diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 index 2a703d2..ba3a39b 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-Categorized.ps1 @@ -27,7 +27,7 @@ function VersionDate-Subject-NoMerges-Categorized { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -70,17 +70,17 @@ function VersionDate-Subject-NoMerges-Categorized { @" ## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + foreach ($c in $commitHistoryCategory) { + $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { if ($_ -match "^(\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") { - if (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $_ diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 index 1317d9c..d8edc21 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-Subject-NoMerges-CategorizedSorted.ps1 @@ -27,7 +27,7 @@ function VersionDate-Subject-NoMerges-CategorizedSorted { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -86,17 +86,17 @@ function VersionDate-Subject-NoMerges-CategorizedSorted { @" ## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + 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 (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $($_.Subject) diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 index bf418d0..7d8ceb4 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-Categorized.ps1 @@ -27,7 +27,7 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -70,17 +70,17 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized { @" ## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + foreach ($c in $commitHistoryCategory) { + $iscommitHistoryCategoryTitleOutputted = $false $commitHistoryCollection | % { if ($_ -match "^(\s*$($c['Name'])\s*)(\(\s*[a-zA-Z0-9_-]+\s*\)\s*)*:(.+)") { - if (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $_ diff --git a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 index e017bf2..b7a7388 100644 --- a/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 +++ b/src/PSRepositoryReleaseManager/generate/variants/VersionDate-SubjectAuthor-NoMerges-CategorizedSorted.ps1 @@ -27,7 +27,7 @@ function VersionDate-SubjectAuthor-NoMerges-CategorizedSorted { if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] } $commitHistory = Get-RepositoryCommitHistory @funcArgs $commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } - $commitCategory = @( + $commitHistoryCategory = @( @{ Name = 'Feature' Title = 'Features' @@ -88,17 +88,17 @@ function VersionDate-SubjectAuthor-NoMerges-CategorizedSorted { @" ## $TagName ($(Get-Date -UFormat '%Y-%m-%d')) "@ - foreach ($c in $commitCategory) { - $isTitleOutputted = $false + 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 (!$isTitleOutputted) { + if (!$iscommitHistoryCategoryTitleOutputted) { @" ### $($c['Title']) "@ - $isTitleOutputted = $true + $iscommitHistoryCategoryTitleOutputted = $true } @" * $($_.Subject) $($_.Author)