Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 97d7422

Browse filesBrowse files
committed
tools: fix failing release-proposal linter for LTS transitions
PR-URL: #60465 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 69b3d2c commit 97d7422
Copy full SHA for 97d7422

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Collapse file

‎tools/actions/lint-release-proposal-commit-list.mjs‎

Copy file name to clipboardExpand all lines: tools/actions/lint-release-proposal-commit-list.mjs
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ if (commitListingStart === -1) {
2626
commitList = changelog.replace(/(^.+\n### Semver-Major|\n### Semver-(Minor|Patch)) Commits\n/gs, '')
2727
.replaceAll('**(SEMVER-MAJOR)** ', '');
2828
} else {
29-
const commitListingEnd = changelog.indexOf('\n\n<a', commitListingStart);
30-
assert.notStrictEqual(commitListingEnd, -1);
31-
commitList = changelog.slice(commitListingStart, commitListingEnd + 1);
29+
// We can't assume the Commits section is the one for this release in case of
30+
// a release to transition to LTS (i.e. with no commits).
31+
const releaseStart = /\n<a id="(\d+\.\d+\.\d+)"><\/a>\n\n## \d+-\d+-\d+, Version \1/.exec(changelog);
32+
assert.ok(releaseStart, 'Could not determine the start of the release section');
33+
const releaseEnd = changelog.indexOf('\n\n<a', releaseStart.index);
34+
assert.notStrictEqual(releaseEnd, -1, 'Could not determine the end of the release section');
35+
commitList = changelog.slice(commitListingStart, releaseEnd + 1);
3236
}
3337

3438
// Normalize for consistent comparison

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.