Skip to content

Commit

Permalink
Fix defaulting logic in release notes tool
Browse files Browse the repository at this point in the history
The bug created an out of range error when from and branch where set
but toRef wasn't.
  • Loading branch information
g-gaston committed Jan 4, 2024
1 parent 624f892 commit 2461779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/tools/release/notes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 2461779

Please sign in to comment.