ci: reworks changelog and release notes generation (#6164)

This commit is contained in:
Elliot DeNolf
2024-04-30 23:50:49 -04:00
committed by GitHub
parent 5a82f34801
commit 17bee6a145
7 changed files with 551 additions and 778 deletions

View File

@@ -0,0 +1,16 @@
import type { ChangelogConfig } from 'changelogen'
import { determineSemverChange, getGitDiff, loadChangelogConfig, parseCommits } from 'changelogen'
export async function getLatestCommits(
fromVersion: string,
toVersion: string,
config?: ChangelogConfig,
) {
if (!config) {
config = await loadChangelogConfig(process.cwd(), {
repo: 'payloadcms/payload',
})
}
return parseCommits(await getGitDiff(fromVersion, toVersion), config)
}