Skip to content

Commit 29847a4

Browse files
Robert Holtrjmholt
Robert Holt
authored andcommitted
Add subject polishing, fix date format
1 parent c9cb4e5 commit 29847a4

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

tools/ChangelogTools.psm1

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ class ChangeLog
5151
[System.Collections.Generic.Dictionary[string, ChangelogEntry]]$Sections
5252
}
5353

54+
function NormalizeSubject
55+
{
56+
[OutputType([string])]
57+
param(
58+
[Parameter(Mandatory)]
59+
[string]
60+
$Subject
61+
)
62+
63+
$Subject = $Subject.Trim()
64+
if ([char]::IsLower($Subject[0])) { $Subject = [char]::ToUpper($Subject[0]) + $Subject.Substring(1) }
65+
if ($Subject[$Subject.Length] -ne '.') { $Subject += '.' }
66+
67+
return $Subject
68+
}
69+
5470
filter Get-ChangeInfoFromCommit
5571
{
5672
[OutputType([ChangeInfo])]
@@ -296,7 +312,7 @@ function New-ChangeLogSection
296312
[void]$sb.AppendLine("[$project #$issueNumber]($link) -").Append($Indent)
297313
}
298314

299-
[void]$sb.Append($item.Subject)
315+
[void]$sb.Append((NormalizeSubject -Subject $item.Subject))
300316
if ($thanks)
301317
{
302318
[void]$sb.Append(" (Thanks @$thanks!)")

tools/changelog/updateChangelog.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Write-Verbose "Configuring settings"
7878
$vscodeRepoName = 'vscode-PowerShell'
7979
$psesRepoName = 'PowerShellEditorServices'
8080

81-
$dateFormat = 'dddd, MMMM dd yyyy'
81+
$dateFormat = 'dddd, MMMM dd, yyyy'
8282

8383
$ignore = @{
8484
User = 'dependabot[bot]'

0 commit comments

Comments
 (0)