1+ //go:build tools
12// +build tools
23
34/*
4- Copyright 2019 The Kubernetes Authors.
5+ Copyright 2021 The Kubernetes Authors.
56
67Licensed under the Apache License, Version 2.0 (the "License");
78you may not use this file except in compliance with the License.
@@ -41,6 +42,7 @@ const (
4142 warning = ":warning: Breaking Changes"
4243 other = ":seedling: Others"
4344 unknown = ":question: Sort these by hand"
45+ superseded = ":recycle: Superseded or Reverted"
4446)
4547
4648var (
5153 documentation ,
5254 other ,
5355 unknown ,
56+ superseded ,
5457 }
5558
5659 fromTag = flag .String ("from" , "" , "The tag or commit to start from." )
@@ -92,8 +95,8 @@ func firstCommit() string {
9295}
9396
9497func run () int {
95- latestTag := latestTag ()
9698 lastTag := lastTag ()
99+ latestTag := latestTag ()
97100 cmd := exec .Command ("git" , "rev-list" , lastTag + "..HEAD" , "--merges" , "--pretty=format:%B" )
98101
99102 merges := map [string ][]string {
@@ -103,6 +106,7 @@ func run() int {
103106 warning : {},
104107 other : {},
105108 unknown : {},
109+ superseded : {},
106110 }
107111 out , err := cmd .CombinedOutput ()
108112 if err != nil {
@@ -170,6 +174,9 @@ func run() int {
170174 merges [key ] = append (merges [key ], formatMerge (body , prNumber ))
171175 }
172176
177+ // Add empty superseded section
178+ merges [superseded ] = append (merges [superseded ], "- `<insert superseded bumps and reverts here>`" )
179+
173180 // TODO Turn this into a link (requires knowing the project name + organization)
174181 fmt .Printf ("Changes since %v\n ---\n " , lastTag )
175182
@@ -184,9 +191,8 @@ func run() int {
184191 }
185192 }
186193
187- fmt .Printf ("The image for this release is: %v\n " , latestTag )
188- fmt .Println ("" )
189- fmt .Println ("_Thanks to all our contributors!_ 😊" )
194+ fmt .Printf ("The container image for this release is: %v\n " , latestTag )
195+ fmt .Println ("\n Thanks to all our contributors! 😊" )
190196
191197 return 0
192198}
0 commit comments