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