Skip to content

Commit

Permalink
gfds
Browse files Browse the repository at this point in the history
  • Loading branch information
marikaner committed Sep 12, 2024
1 parent e3fe641 commit 20b6c15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/actions/merge-changelogs/index.js

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

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

function splitByVersion(changelog: string): ContentByVersion[] {
return changelog.split('\n## ').map(h2 => {
info('splitting by version');
const [version, ...content] = h2.split('\n');
info(`version: ${version}`);
info(`content: ${content}`);
return {
version,
content: content.join('\n').trim()
Expand Down Expand Up @@ -191,6 +188,10 @@ export async function mergeChangelogs(): Promise<void> {
const changelogs = await Promise.all(
pathsToPublicLogs.map(async file => readFile(file, { encoding: 'utf8' }))
);

info(
`parsed changelogs: ${JSON.stringify(changelogs.map(log => parseChangelog(log)))}`
);
const newChangelog = await formatChangelog(
mergeMessages(changelogs.map(log => parseChangelog(log)).flat())
);
Expand Down

0 comments on commit 20b6c15

Please sign in to comment.