Skip to content

Commit 46e7cf9

Browse files
azure-sdkchidozieononiwuweshaggard
authored
Sync eng/common directory with azure-sdk-tools for PR 1688 (Azure#15754)
* Add verification of changelog sections * Update eng/common/scripts/ChangeLog-Operations.ps1 Co-authored-by: Wes Haggard <[email protected]> Co-authored-by: Chidozie Ononiwu <[email protected]> Co-authored-by: Chidozie Ononiwu <[email protected]> Co-authored-by: Wes Haggard <[email protected]>
1 parent 3761ceb commit 46e7cf9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

eng/common/scripts/ChangeLog-Operations.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,21 @@ function Confirm-ChangeLogEntry {
175175
LogError "Entry has no content. Please ensure to provide some content of what changed in this version."
176176
return $false
177177
}
178+
179+
$emptySections = @()
180+
foreach ($key in $changeLogEntry.Sections.Keys)
181+
{
182+
$sectionContent = $changeLogEntry.Sections[$key]
183+
if ([System.String]::IsNullOrWhiteSpace(($sectionContent | Out-String)))
184+
{
185+
$emptySections += $key
186+
}
187+
}
188+
if ($emptySections.Count -gt 0)
189+
{
190+
LogError "The changelog entry has the following sections with no content ($($emptySections -join ', ')). Please ensure to either remove the empty sections or add content to the section."
191+
return $false
192+
}
178193
}
179194
return $true
180195
}

0 commit comments

Comments
 (0)