(emptyBumpFileIds: string[], prNumber: string, prBranch: string | null)
| 1479 | } |
| 1480 | |
| 1481 | function formatEmptyBumpFileComment(emptyBumpFileIds: string[], prNumber: string, prBranch: string | null): string { |
| 1482 | const repo = process.env.GITHUB_REPOSITORY; |
| 1483 | const lines = [ |
| 1484 | `<a href="https://bumpy.varlock.dev"><img src="${FROG_IMG_BASE}/frog-neutral.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`, |
| 1485 | '', |
| 1486 | '**This PR includes an empty bump file — no version bump is needed.** :white_check_mark:', |
| 1487 | '<br clear="left" />', |
| 1488 | '', |
| 1489 | ]; |
| 1490 | |
| 1491 | for (const id of emptyBumpFileIds) { |
| 1492 | const filename = `${id}.md`; |
| 1493 | const parts: string[] = [`\`${filename}\``]; |
| 1494 | if (repo) { |
| 1495 | parts.push( |
| 1496 | `([view diff](https://github.com/${repo}/pull/${prNumber}/changes#diff-${sha256Hex(`.bumpy/${filename}`)}))`, |
| 1497 | ); |
| 1498 | if (prBranch) { |
| 1499 | parts.push(`([edit](https://github.com/${repo}/edit/${prBranch}/.bumpy/${filename}))`); |
| 1500 | } |
| 1501 | } |
| 1502 | lines.push(`- ${parts.join(' ')}`); |
| 1503 | } |
| 1504 | |
| 1505 | lines.push('\n---'); |
| 1506 | lines.push(`_This comment is maintained by [bumpy](https://bumpy.varlock.dev)._`); |
| 1507 | return lines.join('\n'); |
| 1508 | } |
| 1509 | |
| 1510 | /** |
| 1511 | * Comment for a PR with no bump files. |
no test coverage detected
searching dependent graphs…