Skip to content

Commit

Permalink
Deduplicating area in title
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhairya-Arora01 committed Aug 14, 2023
1 parent a8356e4 commit b0898dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hack/tools/release/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,10 @@ func generateReleaseNoteEntry(c *commit) (*releaseNoteEntry, error) {
}

if *prefixAreaLabel {
position := strings.Index(entry.title, area+":")
if position != -1 {
entry.title = strings.TrimSpace(entry.title[position+len(area+":"):])
}
entry.title = fmt.Sprintf("- %s: %s", area, entry.title)
} else {
entry.title = fmt.Sprintf("- %s", entry.title)
Expand Down

0 comments on commit b0898dc

Please sign in to comment.