mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
tools: fix failing release-proposal linter for LTS transitions
PR-URL: https://github.com/nodejs/node/pull/60465 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
bdf03bfcd5
commit
fdcf4d9454
@ -26,9 +26,13 @@ if (commitListingStart === -1) {
|
||||
commitList = changelog.replace(/(^.+\n### Semver-Major|\n### Semver-(Minor|Patch)) Commits\n/gs, '')
|
||||
.replaceAll('**(SEMVER-MAJOR)** ', '');
|
||||
} else {
|
||||
const commitListingEnd = changelog.indexOf('\n\n<a', commitListingStart);
|
||||
assert.notStrictEqual(commitListingEnd, -1);
|
||||
commitList = changelog.slice(commitListingStart, commitListingEnd + 1);
|
||||
// We can't assume the Commits section is the one for this release in case of
|
||||
// a release to transition to LTS (i.e. with no commits).
|
||||
const releaseStart = /\n<a id="(\d+\.\d+\.\d+)"><\/a>\n\n## \d+-\d+-\d+, Version \1/.exec(changelog);
|
||||
assert.ok(releaseStart, 'Could not determine the start of the release section');
|
||||
const releaseEnd = changelog.indexOf('\n\n<a', releaseStart.index);
|
||||
assert.notStrictEqual(releaseEnd, -1, 'Could not determine the end of the release section');
|
||||
commitList = changelog.slice(commitListingStart, releaseEnd + 1);
|
||||
}
|
||||
|
||||
// Normalize for consistent comparison
|
||||
|
||||
Loading…
Reference in New Issue
Block a user