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

Function formatPublishedToSection

packages/bumpy/src/core/github-release.ts:188–212  ·  view source on GitHub ↗
(targets: Record<string, PublishTargetState>)

Source from the content-addressed store, hash-verified

186
187/** Build the "Published to" section from target states */
188export function formatPublishedToSection(targets: Record<string, PublishTargetState>): string {
189 const lines: string[] = ['#### Published to'];
190 for (const [name, state] of Object.entries(targets)) {
191 const label = state.label ?? name;
192 switch (state.status) {
193 case 'success':
194 lines.push(state.url ? `- ✅ [${label}](${state.url})` : `- ✅ ${label}`);
195 break;
196 case 'failed':
197 lines.push(`- ❌ ${label} — will retry on next CI run`);
198 break;
199 case 'skipped':
200 lines.push(
201 state.supersededBy
202 ? `- ⏭️ ${label} — skipped (superseded by ${state.supersededBy})`
203 : `- ⏭️ ${label} — skipped`,
204 );
205 break;
206 case 'pending':
207 lines.push(`- ⏳ ${label}`);
208 break;
209 }
210 }
211 return lines.join('\n');
212}
213
214const GITHUB_PACKAGES_HOST = 'npm.pkg.github.com';
215const DEFAULT_NPM_HOST = 'registry.npmjs.org';

Callers 2

composeReleaseBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…