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

🌱 Exclude release trigger PRs from release notes #9444

Merged
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
12 changes: 8 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,16 @@ 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."):
// TODO(g-gaston): remove the second condition using 🌱 prefix once 1.6 is released
// 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, "🌱"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a TODO to remove this once it's no longer relevant? If I understand right it should be unnecessary after the coming releases for 1.4.X and 1.5.X

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a todo
We can remove it one we release 1.6
Until then, these two commits will show up in the notes for all beta and RC releases for 1.6 (since these read from main)

entry.section = other
entry.title = removePrefixes(entry.title, []string{":seedling:", "🌱"})
default:
entry.section = unknown
}
Expand Down
Loading