Skip to content

Commit

Permalink
Merge pull request #98 from theohbrothers/enhancement/generate-standa…
Browse files Browse the repository at this point in the history
…rdize-processing-of-commit-history-across-all-variants

Enhancement (generate): Standardize processing of commit history across all variants
  • Loading branch information
joeltimothyoh authored May 26, 2024
2 parents c78dad3 + e430237 commit 6586e2a
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ function Changes-HashSubject-Merges {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$releaseBody = & {
@"
## Changes
"@
$commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } | % {
$commitHistoryCollection | % {
@"
* $_
"@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Changes-HashSubject-NoMerges-Categorized {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n"
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$commitCategory = @(
@{
Name = 'Feature'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ function Changes-HashSubject-NoMerges {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$releaseBody = & {
@"
## Changes
"@
$commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } | % {
$commitHistoryCollection | % {
@"
* $_
"@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ function Changes-HashSubject {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$releaseBody = & {
@"
## Changes
"@
$commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } | % {
$commitHistoryCollection | % {
@"
* $_
"@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Changes-HashSubjectAuthor-NoMerges-Categorized {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n"
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$commitCategory = @(
@{
Name = 'Feature'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ function VersionDate-HashSubject-Merges {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$releaseBody = & {
@"
## $TagName ($(Get-Date -UFormat '%Y-%m-%d'))
"@
$commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } | % {
$commitHistoryCollection | % {
@"
* $_
"@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function VersionDate-HashSubject-NoMerges-Categorized {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n"
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$commitCategory = @(
@{
Name = 'Feature'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ function VersionDate-HashSubject-NoMerges {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$releaseBody = & {
@"
## $TagName ($(Get-Date -UFormat '%Y-%m-%d'))
"@
$commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } | % {
$commitHistoryCollection | % {
@"
* $_
"@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ function VersionDate-HashSubject {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$releaseBody = & {
@"
## $TagName ($(Get-Date -UFormat '%Y-%m-%d'))
"@
$commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } | % {
$commitHistoryCollection | % {
@"
* $_
"@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function VersionDate-HashSubjectAuthor-NoMerges-Categorized {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n"
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$commitCategory = @(
@{
Name = 'Feature'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ function VersionDate-Subject-Merges {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$releaseBody = & {
@"
## $TagName ($(Get-Date -UFormat '%Y-%m-%d'))
"@
$commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } | % {
$commitHistoryCollection | % {
@"
* $_
"@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function VersionDate-Subject-NoMerges-Categorized {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n"
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$commitCategory = @(
@{
Name = 'Feature'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ function VersionDate-Subject-NoMerges {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$releaseBody = & {
@"
## $TagName ($(Get-Date -UFormat '%Y-%m-%d'))
"@
$commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } | % {
$commitHistoryCollection | % {
@"
* $_
"@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ function VersionDate-Subject {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$releaseBody = & {
@"
## $TagName ($(Get-Date -UFormat '%Y-%m-%d'))
"@
$commitHistory -split "`n" | % { $_.Trim() } | ? { $_ } | % {
$commitHistoryCollection | % {
@"
* $_
"@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function VersionDate-SubjectAuthor-NoMerges-Categorized {
}
if ($previousRelease) { $funcArgs['SecondRef'] = @($previousRelease)[0] }
$commitHistory = Get-RepositoryCommitHistory @funcArgs
$commitHistoryCollection = $commitHistory -split "`n"
$commitHistoryCollection = $commitHistory -split "`n" | % { $_.Trim() } | ? { $_ }
$commitCategory = @(
@{
Name = 'Feature'
Expand Down

0 comments on commit 6586e2a

Please sign in to comment.