@@ -322,16 +322,24 @@ func run() int {
322
322
fmt .Printf ("## Changes since %v\n ---\n " , commitRange )
323
323
324
324
fmt .Printf ("## :chart_with_upwards_trend: Overview\n " )
325
- if count := len (commits ); count > 0 {
325
+ if count := len (commits ); count == 1 {
326
+ fmt .Println ("- 1 new commit merged" )
327
+ } else if count > 1 {
326
328
fmt .Printf ("- %d new commits merged\n " , count )
327
329
}
328
- if count := len (merges [warning ]); count > 0 {
330
+ if count := len (merges [warning ]); count == 1 {
331
+ fmt .Println ("- 1 breaking change :warning:" )
332
+ } else if count > 1 {
329
333
fmt .Printf ("- %d breaking changes :warning:\n " , count )
330
334
}
331
- if count := len (merges [features ]); count > 0 {
335
+ if count := len (merges [features ]); count == 1 {
336
+ fmt .Println ("- 1 feature addition ✨" )
337
+ } else if count > 1 {
332
338
fmt .Printf ("- %d feature additions ✨\n " , count )
333
339
}
334
- if count := len (merges [bugs ]); count > 0 {
340
+ if count := len (merges [bugs ]); count == 1 {
341
+ fmt .Println ("- 1 bug fixed 🐛" )
342
+ } else if count > 1 {
335
343
fmt .Printf ("- %d bugs fixed 🐛\n " , count )
336
344
}
337
345
fmt .Println ()
@@ -344,11 +352,18 @@ func run() int {
344
352
345
353
switch key {
346
354
case documentation :
347
- fmt .Printf (
348
- ":book: Additionally, there have been %d contributions to our documentation and book. (%s) \n \n " ,
349
- len (mergeslice ),
350
- strings .Join (mergeslice , ", " ),
351
- )
355
+ if len (mergeslice ) == 1 {
356
+ fmt .Printf (
357
+ ":book: Additionally, there has been 1 contribution to our documentation and book. (%s) \n \n " ,
358
+ mergeslice [0 ],
359
+ )
360
+ } else {
361
+ fmt .Printf (
362
+ ":book: Additionally, there have been %d contributions to our documentation and book. (%s) \n \n " ,
363
+ len (mergeslice ),
364
+ strings .Join (mergeslice , ", " ),
365
+ )
366
+ }
352
367
default :
353
368
fmt .Println ("## " + key )
354
369
sort .Strings (mergeslice )
0 commit comments