Skip to content

Commit

Permalink
feg
Browse files Browse the repository at this point in the history
  • Loading branch information
marikaner committed Sep 12, 2024
1 parent 9f7f7ce commit 048088b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .github/actions/merge-changelogs/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions build-packages/merge-changelogs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ function getPackageName(changelog: string): string {
}

function splitByVersion(changelog: string): ContentByVersion[] {
return changelog.split('\n## ').map(h2 => {
const [version, ...content] = h2.split('\n');
return {
version,
content: content.join('\n').trim()
};
});
return changelog
.split('\n## ')
.slice(1)
.map(h2 => {
const [version, ...content] = h2.split('\n');
return {
version,
content: content.join('\n').trim()
};
});
}

function assertGroups(
Expand Down

0 comments on commit 048088b

Please sign in to comment.