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

Function buildDiffLinks

packages/bumpy/src/commands/ci.ts:1601–1606  ·  view source on GitHub ↗

Build inline diff links for a package's changed files in the PR

(pkgDir: string, changesBaseUrl: string | null)

Source from the content-addressed store, hash-verified

1599
1600/** Build inline diff links for a package's changed files in the PR */
1601function buildDiffLinks(pkgDir: string, changesBaseUrl: string | null): string {
1602 if (!changesBaseUrl) return '';
1603 const changelogPath = `${pkgDir}/CHANGELOG.md`;
1604 // GitHub anchors diff sections with #diff-<sha256 of file path>
1605 return ` <sub>[CHANGELOG.md](${changesBaseUrl}#diff-${sha256Hex(changelogPath)})</sub>`;
1606}
1607
1608function sha256Hex(input: string): string {
1609 return createHash('sha256').update(input).digest('hex');

Callers 1

renderFunction · 0.85

Calls 1

sha256HexFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…