Skip to content

Commit e85e775

Browse files
committed
Fix invalid previous tag on krel changelog for beta releases > 0
The changelog for v1.19.0-beta.1 is diffing against the wrong version (the latest alpha): https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.19.md/#changelog-since-v1190-alpha3 This is a regression introduced with our latest branch cut changes and should be fixed with this commit. Signed-off-by: Sascha Grunert <[email protected]>
1 parent b5184f8 commit e85e775

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/github/github.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ func (g *GitHub) LatestGitHubTagsPerBranch() (TagsPerBranch, error) {
323323
for _, t := range allTags {
324324
tag := t.GetName()
325325

326-
// Alpha releases are only available on the master branch
327-
if strings.Contains(tag, "alpha") {
326+
// alpha and beta releases are only available on the master branch
327+
if strings.Contains(tag, "beta") || strings.Contains(tag, "alpha") {
328328
releases.addIfNotExisting(git.Master, tag)
329329
continue
330330
}

pkg/github/github_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ func TestLatestGitHubTagsPerBranchSuccessMultipleForSameBranch(t *testing.T) {
125125

126126
// Then
127127
require.Nil(t, err)
128-
require.Len(t, res, 5)
129-
require.Equal(t, tag2, res[git.Master])
130-
require.Equal(t, tag1, res["release-1.18"])
128+
require.Len(t, res, 4)
129+
require.Equal(t, tag1, res[git.Master])
130+
require.Empty(t, res["release-1.18"])
131131
require.Empty(t, res["release-1.17"])
132132
require.Equal(t, tag5, res["release-1.16"])
133133
require.Equal(t, tag3, res["release-1.15"])

0 commit comments

Comments
 (0)