From 24617799af5813f167e23bef55b5388039e885a4 Mon Sep 17 00:00:00 2001 From: Guillermo Gaston Date: Thu, 4 Jan 2024 15:41:31 +0000 Subject: [PATCH] Fix defaulting logic in release notes tool The bug created an out of range error when from and branch where set but toRef wasn't. --- hack/tools/release/notes/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/tools/release/notes/main.go b/hack/tools/release/notes/main.go index 2417667dc974..860fd702a1c8 100644 --- a/hack/tools/release/notes/main.go +++ b/hack/tools/release/notes/main.go @@ -154,7 +154,7 @@ func validateConfig(config *notesCmdConfig) error { // computeConfigDefaults calculates the value the non specified configuration fields // based on the set fields. func computeConfigDefaults(config *notesCmdConfig) error { - if config.fromRef != "" && config.branch != "" { + if config.fromRef != "" && config.branch != "" && config.toRef != "" { return nil }