Skip to content

Commit 64fbb6c

Browse files
authored
Merge pull request #1334 from saschagrunert/fix-beta-tag
Fix invalid previous tag on krel changelog for beta releases > 0
2 parents 7639f19 + e85e775 commit 64fbb6c

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)