(version: string, date: string, from: string, commits: ParsedCommit[])
| 338 | } |
| 339 | |
| 340 | function 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 | |
| 360 | function renderSections(commits: ParsedCommit[], renderBullet: (commit: ParsedCommit) => string) { |
| 361 | if (commits.length === 0) { |
no test coverage detected