tools: fix linter for semver-major release proposals

PR-URL: https://github.com/nodejs/node/pull/60481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
This commit is contained in:
Antoine du Hamel 2025-11-01 08:11:01 +01:00 committed by GitHub
parent 3e31baeda6
commit 3c248c3556
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,8 +23,9 @@ const commitListingStart = changelog.indexOf('\n### Commits\n');
let commitList;
if (commitListingStart === -1) {
// We're preparing a semver-major release.
commitList = changelog.replace(/(^.+\n### Semver-Major|\n### Semver-(Minor|Patch)) Commits\n/gs, '')
.replaceAll('**(SEMVER-MAJOR)** ', '');
assert.match(changelog, /\n### Semver-Major Commits\n/);
// The proposal should contain only the release commit.
commitList = '';
} else {
// 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).