(errors: string[], prBranch: string | null, pm: PackageManager)
| 1451 | } |
| 1452 | |
| 1453 | function formatBumpFileErrorsComment(errors: string[], prBranch: string | null, pm: PackageManager): string { |
| 1454 | const runCmd = pmRunCommand(pm); |
| 1455 | const lines = [ |
| 1456 | `<a href="https://bumpy.varlock.dev"><img src="${FROG_IMG_BASE}/frog-error.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>`, |
| 1457 | '', |
| 1458 | '**This PR has bump file(s) with errors that need to be fixed.**', |
| 1459 | '<br clear="left" />\n', |
| 1460 | '#### Errors', |
| 1461 | '', |
| 1462 | ...errors.map((e) => `> :x: ${e}`), |
| 1463 | '', |
| 1464 | 'Please fix the errors above or recreate the bump file:\n', |
| 1465 | '```bash', |
| 1466 | `${runCmd} add`, |
| 1467 | '```', |
| 1468 | ]; |
| 1469 | |
| 1470 | const addLink = buildAddBumpFileLink(prBranch); |
| 1471 | if (addLink) { |
| 1472 | lines.push(''); |
| 1473 | lines.push(`Or [click here to add a bump file](${addLink}) directly on GitHub.`); |
| 1474 | } |
| 1475 | |
| 1476 | lines.push('\n---'); |
| 1477 | lines.push(`_This comment is maintained by [bumpy](https://bumpy.varlock.dev)._`); |
| 1478 | return lines.join('\n'); |
| 1479 | } |
| 1480 | |
| 1481 | function formatEmptyBumpFileComment(emptyBumpFileIds: string[], prNumber: string, prBranch: string | null): string { |
| 1482 | const repo = process.env.GITHUB_REPOSITORY; |
no test coverage detected
searching dependent graphs…