MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / createDraft

Function createDraft

scripts/draft-changelog.ts:100–111  ·  view source on GitHub ↗
(options: Options)

Source from the content-addressed store, hash-verified

98}
99
100function createDraft(options: Options): DraftOutput {
101 const versionTag = `v${options.version}`;
102 const to = options.to ?? (tagExists(versionTag) ? versionTag : "HEAD");
103 const from = options.from ?? resolvePreviousTag(versionTag, to);
104 const commits = getCommits(from, to).filter((commit) => !shouldSkipCommit(commit));
105 const parsedCommits = commits.map(parseCommit);
106
107 const releaseNotes = renderReleaseNotes(options.version, options.date, from, parsedCommits);
108 const docsUpdate = renderDocsUpdate(options.version, options.date, from, parsedCommits);
109
110 return { releaseNotes, docsUpdate };
111}
112
113function outputDraft(options: Options, draft: DraftOutput) {
114 if (!options.write) {

Callers 1

mainFunction · 0.85

Calls 6

tagExistsFunction · 0.85
resolvePreviousTagFunction · 0.85
shouldSkipCommitFunction · 0.85
renderReleaseNotesFunction · 0.85
getCommitsFunction · 0.70
renderDocsUpdateFunction · 0.70

Tested by

no test coverage detected