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

Function renderSections

scripts/draft-changelog.ts:360–375  ·  view source on GitHub ↗
(commits: ParsedCommit[], renderBullet: (commit: ParsedCommit) => string)

Source from the content-addressed store, hash-verified

358}
359
360function renderSections(commits: ParsedCommit[], renderBullet: (commit: ParsedCommit) => string) {
361 if (commits.length === 0) {
362 return "No notable changes were found in the selected commit range.";
363 }
364
365 return CATEGORY_ORDER.flatMap((category) => {
366 const commitsInCategory = commits.filter((commit) => commit.category === category);
367 if (commitsInCategory.length === 0) {
368 return [];
369 }
370
371 return [`## ${category}`, "", ...commitsInCategory.map(renderBullet), ""];
372 })
373 .join("\n")
374 .trim();
375}
376
377export function renderCommitBullet(commit: ParsedCommit) {
378 const scope = commit.scope ? `**${formatScope(commit.scope)}:** ` : "";

Callers 2

renderReleaseNotesFunction · 0.85
renderDocsUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected