Skip to content

Commit 3c248c3

Browse files
authored
tools: fix linter for semver-major release proposals
PR-URL: #60481 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
1 parent 3e31bae commit 3c248c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ const commitListingStart = changelog.indexOf('\n### Commits\n');
2323
let commitList;
2424
if (commitListingStart === -1) {
2525
// We're preparing a semver-major release.
26-
commitList = changelog.replace(/(^.+\n### Semver-Major|\n### Semver-(Minor|Patch)) Commits\n/gs, '')
27-
.replaceAll('**(SEMVER-MAJOR)** ', '');
26+
assert.match(changelog, /\n### Semver-Major Commits\n/);
27+
// The proposal should contain only the release commit.
28+
commitList = '';
2829
} else {
2930
// We can't assume the Commits section is the one for this release in case of
3031
// a release to transition to LTS (i.e. with no commits).

0 commit comments

Comments
 (0)