From e24c5f9900a4e2c063650c7e8eaecffa5d127a5a Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:37:04 -0400 Subject: [PATCH] Fix case where changelog wasn't marked as invalid (#5726) Co-authored-by: Wes Haggard --- 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 589583edd..3d159ad8b 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 +}