diff --git a/.github/actions/merge-changelogs/index.js b/.github/actions/merge-changelogs/index.js index 6f55a79abb..f7810af107 100644 --- a/.github/actions/merge-changelogs/index.js +++ b/.github/actions/merge-changelogs/index.js @@ -26,10 +26,7 @@ function getPackageName(changelog) { } function splitByVersion(changelog) { return changelog.split('\n## ').map(h2 => { - (0, core_1.info)('splitting by version'); const [version, ...content] = h2.split('\n'); - (0, core_1.info)(`version: ${version}`); - (0, core_1.info)(`content: ${content}`); return { version, content: content.join('\n').trim() @@ -134,6 +131,7 @@ async function mergeChangelogs() { .map(({ workspace }) => (0, path_1.resolve)(workspace, 'CHANGELOG.md')); (0, core_1.info)(`pathsToPublicLogs: ${pathsToPublicLogs}`); const changelogs = await Promise.all(pathsToPublicLogs.map(async (file) => (0, promises_1.readFile)(file, { encoding: 'utf8' }))); + (0, core_1.info)(`parsed changelogs: ${JSON.stringify(changelogs.map(log => parseChangelog(log)))}`); const newChangelog = await formatChangelog(mergeMessages(changelogs.map(log => parseChangelog(log)).flat())); (0, core_1.setOutput)('changelog', newChangelog); (0, core_1.info)(newChangelog); diff --git a/build-packages/merge-changelogs/index.ts b/build-packages/merge-changelogs/index.ts index 5f4ee2ea06..c51f2dd7e2 100644 --- a/build-packages/merge-changelogs/index.ts +++ b/build-packages/merge-changelogs/index.ts @@ -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() @@ -191,6 +188,10 @@ export async function mergeChangelogs(): Promise { 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()) );