From 3c248c35562389d13057927f11a90b1671cf85ca Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sat, 1 Nov 2025 08:11:01 +0100 Subject: [PATCH] tools: fix linter for semver-major release proposals PR-URL: https://github.com/nodejs/node/pull/60481 Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau --- tools/actions/lint-release-proposal-commit-list.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/actions/lint-release-proposal-commit-list.mjs b/tools/actions/lint-release-proposal-commit-list.mjs index a0deecc00e..9bbc7159fb 100755 --- a/tools/actions/lint-release-proposal-commit-list.mjs +++ b/tools/actions/lint-release-proposal-commit-list.mjs @@ -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).