MCPcopy Create free account
hub / github.com/dmno-dev/bumpy / formatBumpFileErrorsComment

Function formatBumpFileErrorsComment

packages/bumpy/src/commands/ci.ts:1453–1479  ·  view source on GitHub ↗
(errors: string[], prBranch: string | null, pm: PackageManager)

Source from the content-addressed store, hash-verified

1451}
1452
1453function 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
1481function formatEmptyBumpFileComment(emptyBumpFileIds: string[], prNumber: string, prBranch: string | null): string {
1482 const repo = process.env.GITHUB_REPOSITORY;

Callers 1

ciCheckCommandFunction · 0.85

Calls 2

pmRunCommandFunction · 0.85
buildAddBumpFileLinkFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…