File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -125,10 +125,12 @@ function Get-FirstChangelog {
125125 [string ]$RepositoryName
126126 )
127127 $Changelog = Get-Content - Path " $PSScriptRoot /../../$RepositoryName /$ChangelogFile "
128+ # NOTE: The space after the header marker is important! Otherwise ### matches.
129+ $Header = $Changelog.Where ({$_.StartsWith (" ## " )}, " First" )
128130 $Changelog.Where (
129- { $_.StartsWith ( " ## " ) }, " SkipUntil"
131+ { $_ -eq $Header }, " SkipUntil"
130132 ).Where (
131- { $_.StartsWith (" ##" ) }, " Until"
133+ { $_.StartsWith (" ## " ) -and $_ -ne $Header }, " Until"
132134 )
133135}
134136
@@ -355,5 +357,3 @@ function New-DraftRelease {
355357 Get-GitHubRepository - OwnerName PowerShell - RepositoryName $RepositoryName |
356358 New-GitHubRelease @ReleaseParams
357359}
358-
359- Export-ModuleMember - Function Update-Changelog , Update-Version , New-DraftRelease
You can’t perform that action at this time.
0 commit comments