Skip to content

Commit 6e42d6f

Browse files
authored
Merge pull request kubernetes-sigs#9444 from g-gaston/release-prs-release-notes-exclude
🌱 Exclude release trigger PRs from release notes
2 parents 2e0acc6 + 2fb410e commit 6e42d6f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

hack/tools/release/notes.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ func run() int {
298298
os.Exit(0)
299299
}
300300

301-
if result.prEntry.title == "" {
301+
if result.prEntry == nil || result.prEntry.title == "" {
302302
continue
303303
}
304304

@@ -512,12 +512,16 @@ func generateReleaseNoteEntry(c *commit) (*releaseNoteEntry, error) {
512512
if strings.Contains(entry.title, "CAEP") || strings.Contains(entry.title, "proposal") {
513513
entry.section = proposals
514514
}
515-
case strings.HasPrefix(entry.title, ":seedling:"), strings.HasPrefix(entry.title, "🌱"):
516-
entry.section = other
517-
entry.title = removePrefixes(entry.title, []string{":seedling:", "🌱"})
518515
case strings.HasPrefix(entry.title, ":warning:"), strings.HasPrefix(entry.title, "⚠️"):
519516
entry.section = warning
520517
entry.title = removePrefixes(entry.title, []string{":warning:", "⚠️"})
518+
case strings.HasPrefix(entry.title, "🚀"), strings.HasPrefix(entry.title, "🌱 Release v1."):
519+
// TODO(g-gaston): remove the second condition using 🌱 prefix once 1.6 is released
520+
// Release trigger PRs from previous releases are not included in the release notes
521+
return nil, nil
522+
case strings.HasPrefix(entry.title, ":seedling:"), strings.HasPrefix(entry.title, "🌱"):
523+
entry.section = other
524+
entry.title = removePrefixes(entry.title, []string{":seedling:", "🌱"})
521525
default:
522526
entry.section = unknown
523527
}

0 commit comments

Comments
 (0)