(includeSummaries: boolean)
| 1635 | // the per-change bullet points, leaving just the version-bump headers — a |
| 1636 | // big size reduction for releases with many or large change summaries. |
| 1637 | const render = (includeSummaries: boolean): string => { |
| 1638 | const lines: string[] = []; |
| 1639 | lines.push(preamble); |
| 1640 | lines.push(''); |
| 1641 | |
| 1642 | if (!includeSummaries) { |
| 1643 | lines.push( |
| 1644 | '> ℹ️ This release contains too many changes to summarize inline. See the **Files changed** tab and each package’s `CHANGELOG.md` for details.', |
| 1645 | ); |
| 1646 | lines.push(''); |
| 1647 | } |
| 1648 | |
| 1649 | for (const type of ['major', 'minor', 'patch'] as const) { |
| 1650 | const releases = groups[type]; |
| 1651 | if (!releases || releases.length === 0) continue; |
| 1652 | |
| 1653 | lines.push(bumpSectionHeader(type)); |
| 1654 | lines.push(''); |
| 1655 | for (const r of releases) { |
| 1656 | const suffix = r.isDependencyBump ? ' _(dep)_' : r.isCascadeBump ? ' _(cascade)_' : ''; |
| 1657 | const pkgDir = packageDirs.get(r.name); |
| 1658 | const diffLinks = pkgDir ? buildDiffLinks(pkgDir, changesBaseUrl) : ''; |
| 1659 | lines.push(`#### \`${r.name}\` ${r.oldVersion} → **${r.newVersion}**${suffix}${diffLinks}`); |
| 1660 | lines.push(''); |
| 1661 | |
| 1662 | if (!includeSummaries) continue; |
| 1663 | |
| 1664 | const relevantBumpFiles = plan.bumpFiles.filter((bf) => r.bumpFiles.includes(bf.id)); |
| 1665 | |
| 1666 | if (relevantBumpFiles.length > 0) { |
| 1667 | for (const bf of relevantBumpFiles) { |
| 1668 | if (bf.summary) { |
| 1669 | const bfLink = changesBaseUrl |
| 1670 | ? ` ([bump file](${changesBaseUrl}#diff-${sha256Hex(`.bumpy/${bf.id}.md`)}))` |
| 1671 | : ''; |
| 1672 | const summaryLines = bf.summary.split('\n'); |
| 1673 | lines.push(`- ${summaryLines[0]}${bfLink}`); |
| 1674 | for (let i = 1; i < summaryLines.length; i++) { |
| 1675 | if (summaryLines[i]!.trim()) { |
| 1676 | lines.push(` ${summaryLines[i]}`); |
| 1677 | } |
| 1678 | } |
| 1679 | } |
| 1680 | } |
| 1681 | } else if (r.isDependencyBump) { |
| 1682 | lines.push('- Updated dependencies'); |
| 1683 | } else if (r.isCascadeBump) { |
| 1684 | lines.push('- Version bump via cascade rule'); |
| 1685 | } |
| 1686 | |
| 1687 | lines.push(''); |
| 1688 | } |
| 1689 | } |
| 1690 | |
| 1691 | if (showNoPatWarning) { |
| 1692 | lines.push( |
| 1693 | '> ⚠️ `BUMPY_GH_TOKEN` is not set — CI checks will not run automatically on this PR. Run `bumpy ci setup` for help.', |
| 1694 | ); |
no test coverage detected
searching dependent graphs…