Skip to content

Commit

Permalink
🌱 Add additional blocks to release note generation
Browse files Browse the repository at this point in the history
* An optional header when generating a release candidate
* A highlights header with filler to manually replace
* An optional header about deprecation warnings

Signed-off-by: Michael Shen <mishen@umich.edu>
  • Loading branch information
mjlshen committed Aug 22, 2023
1 parent 82eff49 commit a8535b6
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion hack/tools/release/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ var (

prefixAreaLabel = flag.Bool("prefix-area-label", true, "If enabled, will prefix the area label.")

releaseCandidate = flag.Bool("release-candidate", false, "If enabled, will add a release candidate warning header. (default false)")
deprecation = flag.Bool("deprecation", true, "If enabled, will add a templated deprecation warning header. (default false)")
addKubernetesVersionSupport = flag.Bool("add-kubernetes-version-support", true, "If enabled, will add the Kubernetes version support header.")

tagRegex = regexp.MustCompile(`^\[release-[\w-\.]*\]`)
Expand Down Expand Up @@ -307,15 +309,34 @@ func run() int {
}
}

if *releaseCandidate {
fmt.Printf("🚨 This is a RELEASE CANDIDATE. Use it only for testing purposes. If you find any bugs, file an [issue](https://github.com/kubernetes-sigs/cluster-api/issues/new).\n")
}

if *addKubernetesVersionSupport {
// TODO Turn this into a link (requires knowing the project name + organization)
fmt.Print(`## 👌 Kubernetes version support
- Management Cluster: v1.**X**.x -> v1.**X**.x
- Workload Cluster: v1.**X**.x -> v1.**X**.x
[More information about version support can be found here](https://cluster-api.sigs.k8s.io/reference/versions.html)
`)
}

fmt.Print(`## Highlights
* REPLACE ME
`)

if *deprecation {
fmt.Print(`## Deprecation Warning
REPLACE ME: A couple sentences describing the deprecation, including links to docs.
* [GitHub issue #REPLACE ME](REPLACE ME)
`)
}

Expand Down

0 comments on commit a8535b6

Please sign in to comment.