Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 fixed grammatically incorrect plurals in release tools #9024

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions hack/tools/release/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,24 @@ func run() int {
fmt.Printf("## Changes since %v\n---\n", commitRange)

fmt.Printf("## :chart_with_upwards_trend: Overview\n")
if count := len(commits); count > 0 {
if count := len(commits); count == 1 {
fmt.Println("- 1 new commit merged")
} else if count > 1 {
fmt.Printf("- %d new commits merged\n", count)
}
if count := len(merges[warning]); count > 0 {
if count := len(merges[warning]); count == 1 {
fmt.Println("- 1 breaking change :warning:")
} else if count > 1 {
fmt.Printf("- %d breaking changes :warning:\n", count)
}
if count := len(merges[features]); count > 0 {
if count := len(merges[features]); count == 1 {
fmt.Println("- 1 feature addition ✨")
} else if count > 1 {
fmt.Printf("- %d feature additions ✨\n", count)
}
if count := len(merges[bugs]); count > 0 {
if count := len(merges[bugs]); count == 1 {
fmt.Println("- 1 bug fixed 🐛")
} else if count > 1 {
fmt.Printf("- %d bugs fixed 🐛\n", count)
}
fmt.Println()
Expand All @@ -335,11 +343,18 @@ func run() int {

switch key {
case documentation:
fmt.Printf(
":book: Additionally, there have been %d contributions to our documentation and book. (%s) \n\n",
len(mergeslice),
strings.Join(mergeslice, ", "),
)
if len(mergeslice) == 1 {
fmt.Printf(
":book: Additionally, there has been 1 contribution to our documentation and book. (%s) \n\n",
mergeslice[0],
)
} else {
fmt.Printf(
":book: Additionally, there have been %d contributions to our documentation and book. (%s) \n\n",
len(mergeslice),
strings.Join(mergeslice, ", "),
)
}
default:
fmt.Println("## " + key)
sort.Strings(mergeslice)
Expand Down