Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 1688 (#22302)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
4 people authored Jun 16, 2021
1 parent 1b68508 commit ebb00c4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions eng/common/scripts/ChangeLog-Operations.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,21 @@ function Confirm-ChangeLogEntry {
LogError "Entry has no content. Please ensure to provide some content of what changed in this version."
return $false
}

$emptySections = @()
foreach ($key in $changeLogEntry.Sections.Keys)
{
$sectionContent = $changeLogEntry.Sections[$key]
if ([System.String]::IsNullOrWhiteSpace(($sectionContent | Out-String)))
{
$emptySections += $key
}
}
if ($emptySections.Count -gt 0)
{
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."
return $false
}
}
return $true
}
Expand Down

0 comments on commit ebb00c4

Please sign in to comment.