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

Function renderDocsUpdate

scripts/draft-changelog.ts:340–358  ·  view source on GitHub ↗
(version: string, date: string, from: string, commits: ParsedCommit[])

Source from the content-addressed store, hash-verified

338}
339
340function renderDocsUpdate(version: string, date: string, from: string, commits: ParsedCommit[]) {
341 const sections = renderSections(commits, renderMdxCommitBullet);
342 const compareUrl = `${REPO_URL}/compare/${from}...v${version}`;
343 const tags = renderTags(commits);
344
345 return [
346 "<Update",
347 ` label="HyperFrames v${version}"`,
348 ` description="Released - ${date}"`,
349 ` tags={${renderTagsLiteral(tags)}}`,
350 ">",
351 "<!-- TODO: write a 1-2 sentence release summary here. -->",
352 "",
353 sections,
354 "",
355 `[View the full commit range](${compareUrl}).`,
356 "</Update>",
357 ].join("\n");
358}
359
360function renderSections(commits: ParsedCommit[], renderBullet: (commit: ParsedCommit) => string) {
361 if (commits.length === 0) {

Callers 1

createDraftFunction · 0.70

Calls 3

renderSectionsFunction · 0.85
renderTagsFunction · 0.85
renderTagsLiteralFunction · 0.85

Tested by

no test coverage detected