Skip to content

Commit

Permalink
Exclude release trigger PRs from release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
g-gaston committed Sep 16, 2023
1 parent e92e712 commit d88ba85
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions hack/tools/release/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func run() int {
os.Exit(0)
}

if result.prEntry.title == "" {
if result.prEntry == nil || result.prEntry.title == "" {
continue
}

Expand Down Expand Up @@ -512,12 +512,15 @@ func generateReleaseNoteEntry(c *commit) (*releaseNoteEntry, error) {
if strings.Contains(entry.title, "CAEP") || strings.Contains(entry.title, "proposal") {
entry.section = proposals
}
case strings.HasPrefix(entry.title, ":seedling:"), strings.HasPrefix(entry.title, "🌱"):
entry.section = other
entry.title = removePrefixes(entry.title, []string{":seedling:", "🌱"})
case strings.HasPrefix(entry.title, ":warning:"), strings.HasPrefix(entry.title, "⚠️"):
entry.section = warning
entry.title = removePrefixes(entry.title, []string{":warning:", "⚠️"})
case strings.HasPrefix(entry.title, "🚀"), strings.HasPrefix(entry.title, "🌱 Release v1."):
// Release trigger PRs from previous releases are not included in the release notes
return nil, nil
case strings.HasPrefix(entry.title, ":seedling:"), strings.HasPrefix(entry.title, "🌱"):
entry.section = other
entry.title = removePrefixes(entry.title, []string{":seedling:", "🌱"})
default:
entry.section = unknown
}
Expand Down

0 comments on commit d88ba85

Please sign in to comment.