ci: reworks changelog and release notes generation (#6164)
This commit is contained in:
16
scripts/utils/getLatestCommits.ts
Normal file
16
scripts/utils/getLatestCommits.ts
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user