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 1772 (Azure#22381)
* Update change log headers based on guideline update
Updates based on Azure/azure-sdk#3103
- Renamed "Key Bugs Fixed" to "Bugs Fixed"
- Renamed "Fixed" to "Other Changes"
Added a warning in validation if at lease one of the recommended
headers aren't used.
* Update eng/common/scripts/ChangeLog-Operations.ps1
Co-authored-by: JoshLove-msft <[email protected]>
Co-authored-by: Wes Haggard <[email protected]>
Co-authored-by: Wes Haggard <[email protected]>
Co-authored-by: JoshLove-msft <[email protected]>
# Returns a Collection of changeLogEntry object containing changelog info for all version present in the gived CHANGELOG
10
11
functionGet-ChangeLogEntries {
@@ -109,7 +110,6 @@ function Get-ChangeLogEntryAsString {
109
110
return ChangeLogEntryAsString $changeLogEntry
110
111
}
111
112
112
-
113
113
functionChangeLogEntryAsString($changeLogEntry) {
114
114
if (!$changeLogEntry) {
115
115
return"[Missing change log entry]"
@@ -141,13 +141,13 @@ function Confirm-ChangeLogEntry {
141
141
Write-Host"-----"
142
142
143
143
if ([System.String]::IsNullOrEmpty($changeLogEntry.ReleaseStatus)) {
144
-
LogError "Entry does not have a correct release status. Please ensure the status is set to a date '($CHANGELOG_DATE_FORMAT)' or '$CHANGELOG_UNRELEASED_STATUS' if not yet released."
144
+
LogError "Entry does not have a correct 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."
145
145
return$false
146
146
}
147
147
148
148
if ($ForRelease-eq$True) {
149
149
if ($changeLogEntry.ReleaseStatus-eq$CHANGELOG_UNRELEASED_STATUS) {
150
-
LogError "Entry has no release date set. Please ensure to set a release date with format '$CHANGELOG_DATE_FORMAT'."
150
+
LogError "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."
151
151
return$false
152
152
}
153
153
else {
@@ -156,26 +156,27 @@ function Confirm-ChangeLogEntry {
156
156
$releaseDate= [DateTime]$status
157
157
if ($status-ne ($releaseDate.ToString($CHANGELOG_DATE_FORMAT)))
158
158
{
159
-
LogError "Date must be in the format $($CHANGELOG_DATE_FORMAT)"
159
+
LogError "Date must be in the format $($CHANGELOG_DATE_FORMAT). See https://aka.ms/azsdk/guideline/changelogs for more info."
160
160
return$false
161
161
}
162
162
if (((Get-Date).AddMonths(-1) -gt$releaseDate) -or ($releaseDate-gt (Get-Date).AddMonths(1)))
163
163
{
164
-
LogError "The date must be within +/- one month from today."
164
+
LogError "The date must be within +/- one month from today. See https://aka.ms/azsdk/guideline/changelogs for more info."
165
165
return$false
166
166
}
167
167
}
168
168
catch {
169
-
LogError "Invalid date [ $status ] passed as status for Version [$($changeLogEntry.ReleaseVersion)]."
169
+
LogError "Invalid date [ $status ] passed as status for Version [$($changeLogEntry.ReleaseVersion)]. See https://aka.ms/azsdk/guideline/changelogs for more info."
170
170
return$false
171
171
}
172
172
}
173
173
174
174
if ([System.String]::IsNullOrWhiteSpace($changeLogEntry.ReleaseContent)) {
175
-
LogError "Entry has no content. Please ensure to provide some content of what changed in this version."
175
+
LogError "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."
176
176
return$false
177
177
}
178
178
179
+
$foundRecomendedSection=$false
179
180
$emptySections=@()
180
181
foreach ($keyin$changeLogEntry.Sections.Keys)
181
182
{
@@ -184,12 +185,20 @@ function Confirm-ChangeLogEntry {
184
185
{
185
186
$emptySections+=$key
186
187
}
188
+
if ($RecommendedSectionHeaders-contains$key)
189
+
{
190
+
$foundRecomendedSection=$true
191
+
}
187
192
}
188
193
if ($emptySections.Count-gt0)
189
194
{
190
195
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
196
return$false
192
197
}
198
+
if (!$foundRecomendedSection)
199
+
{
200
+
LogWarning "The changelog entry did not contain any of the recommended sections ($($RecommendedSectionHeaders-join', ')), pease add at least one. See https://aka.ms/azsdk/guideline/changelogs for more info."
201
+
}
193
202
}
194
203
return$true
195
204
}
@@ -228,15 +237,12 @@ function New-ChangeLogEntry {
0 commit comments