@@ -223,34 +223,25 @@ async function createVersionPr(
223223
224224// ---- PR comment helpers ----
225225
226- const FROG_IMG_BASE = 'https://raw.githubusercontent.com/dmno-dev/bumpy/main/images' ;
227-
228226function formatReleasePlanComment ( plan : ReleasePlan , changesetCount : number ) : string {
229227 const lines : string [ ] = [ ] ;
230-
231- const preamble = [
232- `<a href="${ __BUMPY_WEBSITE_URL__ } "><img src="${ FROG_IMG_BASE } /frog-talking.png" alt="bumpy-frog" width="60" align="left" style="image-rendering: pixelated;" title="Hi! I'm bumpy!" /></a>` ,
233- '' ,
234- `**${ changesetCount } ** changeset(s) → **${ plan . releases . length } ** package(s) to release` ,
235- '<br clear="left" />' ,
236- ] . join ( '\n' ) ;
237- lines . push ( preamble ) ;
238- lines . push ( '' ) ;
239-
240- const groups : Record < string , PlannedRelease [ ] > = { major : [ ] , minor : [ ] , patch : [ ] } ;
241- for ( const r of plan . releases ) {
242- groups [ r . type ] ?. push ( r ) ;
243- }
244-
245- for ( const type of [ 'major' , 'minor' , 'patch' ] as const ) {
246- const releases = groups [ type ] ;
247- if ( ! releases || releases . length === 0 ) continue ;
248-
249- lines . push ( bumpSectionHeader ( type ) ) ;
250- lines . push ( '' ) ;
251- for ( const r of releases ) {
228+ lines . push ( '## 🐸 Bumpy Release Plan\n' ) ;
229+ lines . push ( `**${ changesetCount } ** changeset(s) → **${ plan . releases . length } ** package(s) to release\n` ) ;
230+
231+ const groups : [ string , PlannedRelease [ ] ] [ ] = [
232+ [ '🔴 Major' , plan . releases . filter ( ( r ) => r . type === 'major' ) ] ,
233+ [ '🟡 Minor' , plan . releases . filter ( ( r ) => r . type === 'minor' ) ] ,
234+ [ '🟢 Patch' , plan . releases . filter ( ( r ) => r . type === 'patch' ) ] ,
235+ ] ;
236+
237+ for ( const [ label , group ] of groups ) {
238+ if ( group . length === 0 ) continue ;
239+ lines . push ( `### ${ label } \n` ) ;
240+ lines . push ( '| Package | Change |' ) ;
241+ lines . push ( '|---------|--------|' ) ;
242+ for ( const r of group ) {
252243 const suffix = r . isDependencyBump ? ' _(dep)_' : r . isCascadeBump ? ' _(cascade)_' : '' ;
253- lines . push ( `- \`${ r . name } \` ${ r . oldVersion } → **${ r . newVersion } **${ suffix } ` ) ;
244+ lines . push ( `| \`${ r . name } \` | ${ r . oldVersion } → **${ r . newVersion } **${ suffix } | ` ) ;
254245 }
255246 lines . push ( '' ) ;
256247 }
@@ -262,10 +253,8 @@ function formatReleasePlanComment(plan: ReleasePlan, changesetCount: number): st
262253
263254function formatNoChangesetsComment ( ) : string {
264255 return [
265- `<a href="${ __BUMPY_WEBSITE_URL__ } "><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>` ,
266- '' ,
267- 'No changesets found in this PR. If this PR should trigger a release, run:' ,
268- '<br clear="left" />\n' ,
256+ '## 🐸 Bumpy Release Plan\n' ,
257+ 'No changesets found in this PR. If this PR should trigger a release, run:\n' ,
269258 '```bash' ,
270259 'bumpy add' ,
271260 '```\n' ,
@@ -274,6 +263,8 @@ function formatNoChangesetsComment(): string {
274263 ] . join ( '\n' ) ;
275264}
276265
266+ const FROG_IMG_BASE = 'https://raw.githubusercontent.com/dmno-dev/bumpy/main/images' ;
267+
277268function bumpSectionHeader ( type : string ) : string {
278269 // I think pixelated css gets stripped but may as well leave it
279270 const frog = `<img src="${ FROG_IMG_BASE } /frog-${ type } .png" alt="${ type } " width="52" style="image-rendering: pixelated;" align="right" />` ;
0 commit comments