Skip to content

Commit

Permalink
Reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
willie-yao committed Feb 27, 2024
1 parent ba834c9 commit 928f44f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions hack/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -73,6 +71,7 @@ require (
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-git/go-git/v5 v5.11.0 // indirect
github.com/google/go-github/v58 v58.0.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
Expand Down
6 changes: 1 addition & 5 deletions hack/tools/release/notes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions hack/tools/release/notes/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
Expand Down Expand Up @@ -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:")
Expand Down

0 comments on commit 928f44f

Please sign in to comment.