Skip to content

Commit b4dcfb2

Browse files
authored
ci(changelog): Validate changelog section (#4841)
Validates that the changelog is in the correct section, not just existing.
1 parent 063da46 commit b4dcfb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/actions/changelog/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = async ({github, context, core}) => {
4747
});
4848
const buf = Buffer.alloc(data.content.length, data.content, data.encoding);
4949
const fileContent = buf.toString();
50-
return fileContent.includes(PR_LINK);
50+
return fileContent.match(/## Unreleased(.*?)##/ms)?.[1]?.includes(PR_LINK) || false;
5151
}
5252

5353
async function checkChangelog(pr) {

0 commit comments

Comments
 (0)