Skip to content

Commit

Permalink
Address review comments: renametypes and vars
Browse files Browse the repository at this point in the history
  • Loading branch information
g-gaston committed Jun 13, 2023
1 parent eae3326 commit 55a1057
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions hack/tools/release/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var (

tagRegex = regexp.MustCompile(`^\[release-[\w-\.]*\]`)

areaLabelsFormatMapping = map[string]string{
userFriendlyAreas = map[string]string{
"e2e-testing": "e2e",
"provider/control-plane-kubeadm": "KCP",
"provider/infrastructure-docker": "CAPD",
Expand Down Expand Up @@ -164,8 +164,8 @@ func getAreaLabel(merge string) (string, error) {
return missingAreaLabelPrefix, nil
case 1:
area := areaLabels[0]
if formattedArea := areaLabelsFormatMapping[area]; formattedArea != "" {
area = formattedArea
if userFriendlyArea, ok := userFriendlyAreas[area]; ok {
area = userFriendlyArea
}
return area, nil
default:
Expand Down Expand Up @@ -291,17 +291,17 @@ func run() int {
fmt.Printf("Changes since %v\n---\n", commitRange)

fmt.Printf("## :chart_with_upwards_trend: Overview\n")
if size := len(commits); size > 0 {
fmt.Printf("- %d new commits merged\n", size)
if count := len(commits); count > 0 {
fmt.Printf("- %d new commits merged\n", count)
}
if size := len(merges[warning]); size > 0 {
fmt.Printf("- %d breaking changes :warning:\n", size)
if count := len(merges[warning]); count > 0 {
fmt.Printf("- %d breaking changes :warning:\n", count)
}
if size := len(merges[features]); size > 0 {
fmt.Printf("- %d feature additions ✨\n", size)
if count := len(merges[features]); count > 0 {
fmt.Printf("- %d feature additions ✨\n", count)
}
if size := len(merges[bugs]); size > 0 {
fmt.Printf("- %d bugs fixed 🐛\n", size)
if count := len(merges[bugs]); count > 0 {
fmt.Printf("- %d bugs fixed 🐛\n", count)
}
fmt.Println()

Expand Down

0 comments on commit 55a1057

Please sign in to comment.