Files
payloadcms/tools/releaser/src/utils/getLatestCommits.ts
Elliot DeNolf f18ca9cc2b build: move larger scripts into tools dir in workspace (#10653)
Having the `scripts` dir re-use all packages from the top-level was
getting quite unwieldy. Created new `tools` directory that is part of
the workspace. Packages are exported with the `@tools` package
namespace.
2025-01-20 11:34:51 -05:00

17 lines
460 B
TypeScript

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)
}