From af8c8f30db590ae0645d91f2d4020d77d4077d56 Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Mon, 17 Jun 2024 15:26:11 -0700 Subject: [PATCH] Fix case where changelog wasn't marked as invalid --- eng/common/scripts/ChangeLog-Operations.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eng/common/scripts/ChangeLog-Operations.ps1 b/eng/common/scripts/ChangeLog-Operations.ps1 index 589583eddee9..3d159ad8be74 100644 --- a/eng/common/scripts/ChangeLog-Operations.ps1 +++ b/eng/common/scripts/ChangeLog-Operations.ps1 @@ -297,8 +297,8 @@ function Remove-EmptySections { { $parsedSections = $ChangeLogEntry.Sections $sanitizedReleaseContent = New-Object System.Collections.ArrayList(,$releaseContent) - - foreach ($key in @($parsedSections.Keys)) + + foreach ($key in @($parsedSections.Keys)) { if ([System.String]::IsNullOrWhiteSpace($parsedSections[$key])) { @@ -442,9 +442,10 @@ function Confirm-ChangeLogForRelease { if (!$foundRecommendedSection) { $ChangeLogStatus.Message = "The changelog entry did not contain any of the recommended sections ($($RecommendedSectionHeaders -join ', ')), please add at least one. See https://aka.ms/azsdk/guideline/changelogs for more info." + $ChangeLogStatus.IsValid = $false if (!$SuppressErrors) { LogError "$($ChangeLogStatus.Message)" } } return $ChangeLogStatus.IsValid -} \ No newline at end of file +}