diff --git a/tools/actions/lint-release-proposal-commit-list.mjs b/tools/actions/lint-release-proposal-commit-list.mjs index b5104a6503e489..9824f70ba553a1 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 { const commitListingEnd = changelog.indexOf('\n\n