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

🌱 Improve multiple areas PRs with user friendly subs #9071

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
13 changes: 7 additions & 6 deletions hack/tools/release/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ func getAreaLabel(merge string) (string, error) {
var areaLabels []string
for _, label := range pr.Labels {
if area, ok := trimAreaLabel(label.Name); ok {
if userFriendlyArea, ok := userFriendlyAreas[area]; ok {
area = userFriendlyArea
}

areaLabels = append(areaLabels, area)
}
}
Expand All @@ -183,13 +187,9 @@ func getAreaLabel(merge string) (string, error) {
case 0:
return missingAreaLabelPrefix, nil
case 1:
area := areaLabels[0]
if userFriendlyArea, ok := userFriendlyAreas[area]; ok {
area = userFriendlyArea
}
return area, nil
return areaLabels[0], nil
default:
return multipleAreaLabelsPrefix + strings.Join(areaLabels, "|") + "]", nil
return multipleAreaLabelsPrefix + strings.Join(areaLabels, "/") + "]", nil
}
}

Expand Down Expand Up @@ -371,6 +371,7 @@ func run() int {
str2 := strings.ToLower(mergeslice[j])
return str1 < str2
})

for _, merge := range mergeslice {
fmt.Println(merge)
}
Expand Down