You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sync eng/common directory with azure-sdk-tools for PR 8053 (#35135)
* Pass flag to suppress errors correctly when verifying release change log
* Changes as per review comments
---------
Co-authored-by: Praveen Kuttappan <[email protected]>
$ChangeLogStatus.Message="ChangeLog[${ChangeLogLocation}] does not have an entry for version ${VersionString}."
161
157
$ChangeLogStatus.IsValid=$false
162
-
if (!$suppressErrors) {
158
+
if (!$SuppressErrors) {
163
159
LogError "$($ChangeLogStatus.Message)"
164
160
}
165
161
return$false
@@ -179,7 +175,7 @@ function Confirm-ChangeLogEntry {
179
175
if ([System.String]::IsNullOrEmpty($changeLogEntry.ReleaseStatus)) {
180
176
$ChangeLogStatus.Message="Entry does not have a release status. Please ensure the status is set to a date '($CHANGELOG_DATE_FORMAT)' or '$CHANGELOG_UNRELEASED_STATUS' if not yet released. See https://aka.ms/azsdk/guideline/changelogs for more info."
181
177
$ChangeLogStatus.IsValid=$false
182
-
if (!$suppressErrors) {
178
+
if (!$SuppressErrors) {
183
179
LogError "$($ChangeLogStatus.Message)"
184
180
}
185
181
return$false
@@ -188,15 +184,15 @@ function Confirm-ChangeLogEntry {
188
184
if ($ForRelease-eq$True)
189
185
{
190
186
LogDebug "Verifying as a release build because ForRelease parameter is set to true"
if ($changeLogEntry.ReleaseStatus-eq$CHANGELOG_UNRELEASED_STATUS) {
381
375
$ChangeLogStatus.Message="Entry has no release date set. Please ensure to set a release date with format '$CHANGELOG_DATE_FORMAT'. See https://aka.ms/azsdk/guideline/changelogs for more info."
382
376
$ChangeLogStatus.IsValid=$false
383
-
if (!$suppressErrors) {
377
+
if (!$SuppressErrors) {
384
378
LogError "$($ChangeLogStatus.Message)"
385
379
}
386
380
}
@@ -392,7 +386,7 @@ function Confirm-ChangeLogForRelease {
392
386
{
393
387
$ChangeLogStatus.Message="Date must be in the format $($CHANGELOG_DATE_FORMAT). See https://aka.ms/azsdk/guideline/changelogs for more info."
394
388
$ChangeLogStatus.IsValid=$false
395
-
if (!$suppressErrors) {
389
+
if (!$SuppressErrors) {
396
390
LogError "$($ChangeLogStatus.Message)"
397
391
}
398
392
}
@@ -401,15 +395,15 @@ function Confirm-ChangeLogForRelease {
401
395
{
402
396
$ChangeLogStatus.Message="Invalid date [ $status ]. The date for the changelog being released must be the latest in the file."
403
397
$ChangeLogStatus.IsValid=$false
404
-
if (!$suppressErrors) {
398
+
if (!$SuppressErrors) {
405
399
LogError "$($ChangeLogStatus.Message)"
406
400
}
407
401
}
408
402
}
409
403
catch {
410
404
$ChangeLogStatus.Message="Invalid date [ $status ] passed as status for Version [$($changeLogEntry.ReleaseVersion)]. See https://aka.ms/azsdk/guideline/changelogs for more info."
411
405
$ChangeLogStatus.IsValid=$false
412
-
if (!$suppressErrors) {
406
+
if (!$SuppressErrors) {
413
407
LogError "$($ChangeLogStatus.Message)"
414
408
}
415
409
}
@@ -418,7 +412,7 @@ function Confirm-ChangeLogForRelease {
418
412
if ([System.String]::IsNullOrWhiteSpace($changeLogEntry.ReleaseContent)) {
419
413
$ChangeLogStatus.Message="Entry has no content. Please ensure to provide some content of what changed in this version. See https://aka.ms/azsdk/guideline/changelogs for more info."
420
414
$ChangeLogStatus.IsValid=$false
421
-
if (!$suppressErrors) {
415
+
if (!$SuppressErrors) {
422
416
LogError "$($ChangeLogStatus.Message)"
423
417
}
424
418
}
@@ -441,14 +435,14 @@ function Confirm-ChangeLogForRelease {
441
435
{
442
436
$ChangeLogStatus.Message="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."
443
437
$ChangeLogStatus.IsValid=$false
444
-
if (!$suppressErrors) {
438
+
if (!$SuppressErrors) {
445
439
LogError "$($ChangeLogStatus.Message)"
446
440
}
447
441
}
448
442
if (!$foundRecommendedSection)
449
443
{
450
444
$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."
0 commit comments