diff --git a/hack/tools/go.mod b/hack/tools/go.mod index 4bd402cd3559..e655fa7e5c54 100644 --- a/hack/tools/go.mod +++ b/hack/tools/go.mod @@ -33,8 +33,6 @@ require ( sigs.k8s.io/yaml v1.4.0 ) -require github.com/google/go-github/v58 v58.0.0 // indirect - require ( cloud.google.com/go v0.112.0 // indirect cloud.google.com/go/compute v1.23.4 // indirect @@ -85,6 +83,7 @@ require ( github.com/google/cel-go v0.17.7 // indirect github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect github.com/google/go-github/v53 v53.2.0 // indirect + github.com/google/go-github/v58 v58.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect diff --git a/hack/tools/release/notes/main.go b/hack/tools/release/notes/main.go index 819ad6d3e5c7..711336cbc1b5 100644 --- a/hack/tools/release/notes/main.go +++ b/hack/tools/release/notes/main.go @@ -182,11 +182,7 @@ func computeConfigDefaults(config *notesCmdConfig) error { } if config.toRef == "" { - if newTag.Patch == 0 { - config.toRef = release.TagsPrefix + fmt.Sprintf("v%d.%d.0", newTag.Major, newTag.Minor) - } else { - config.toRef = release.TagsPrefix + fmt.Sprintf("v%d.%d.%d", newTag.Major, newTag.Minor, newTag.Patch) - } + config.toRef = "heads/" + config.branch } return nil diff --git a/hack/tools/release/notes/print.go b/hack/tools/release/notes/print.go index afa8bde9c743..2c0a4affbe83 100644 --- a/hack/tools/release/notes/print.go +++ b/hack/tools/release/notes/print.go @@ -57,7 +57,7 @@ func newReleaseNotesPrinter(repo, fromTag string) *releaseNotesPrinter { } // print outputs to stdout the release notes. -func (p *releaseNotesPrinter) print(entries []notesEntry, commitCount int, dependencies string) { +func (p *releaseNotesPrinter) print(entries []notesEntry, commitsInRelease int, dependencies string) { merges := map[string][]string{ release.Features: {}, release.Bugs: {}, @@ -109,10 +109,10 @@ REPLACE ME: A couple sentences describing the deprecation, including links to do fmt.Printf("## Changes since %s\n", p.fromTag) fmt.Printf("## :chart_with_upwards_trend: Overview\n") - if commitCount == 1 { + if commitsInRelease == 1 { fmt.Println("- 1 new commit merged") - } else if commitCount > 1 { - fmt.Printf("- %d new commits merged\n", commitCount) + } else if commitsInRelease > 1 { + fmt.Printf("- %d new commits merged\n", commitsInRelease) } if count := len(merges[release.Warning]); count == 1 { fmt.Println("- 1 breaking change :warning:")