Skip to content

Commit

Permalink
improve release notes tool
Browse files Browse the repository at this point in the history
- Add missing empty link after release image.
- Add superseded or reverted category, which is filled manually but
  present everytime
  • Loading branch information
tuminoid committed Sep 1, 2023
1 parent 0774930 commit e3c4c2f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ ironic-deployment/overlays/temp

# Development containers (https://containers.dev/)
.devcontainer

# release-notes
/releasenotes
8 changes: 7 additions & 1 deletion hack/tools/release_notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const (
warning = ":warning: Breaking Changes"
other = ":seedling: Others"
unknown = ":question: Sort these by hand"
superseded = ":arrow_up: Superseded or Reverted"
)

var (
Expand All @@ -52,6 +53,7 @@ var (
documentation,
other,
unknown,
superseded,
}

fromTag = flag.String("from", "", "The tag or commit to start from.")
Expand Down Expand Up @@ -104,6 +106,7 @@ func run() int {
warning: {},
other: {},
unknown: {},
superseded: {},
}
out, err := cmd.CombinedOutput()
if err != nil {
Expand Down Expand Up @@ -171,6 +174,9 @@ func run() int {
merges[key] = append(merges[key], formatMerge(body, prNumber))
}

// Add empty superseded section
merges[superseded] = append(merges[superseded], "- `<insert superseded bumps and reverts here>`")

// TODO Turn this into a link (requires knowing the project name + organization)
fmt.Printf("Changes since %v\n---\n", lastTag)

Expand All @@ -186,7 +192,7 @@ func run() int {
}

fmt.Printf("The container image for this release is: %v\n", latestTag)
fmt.Println("Thanks to all our contributors! 😊")
fmt.Println("\nThanks to all our contributors! 😊")

return 0
}
Expand Down

0 comments on commit e3c4c2f

Please sign in to comment.