Skip to content

Commit 1637d12

Browse files
committed
feat: return empty result on no tag
1 parent 3dea5ee commit 1637d12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

routers/web/repo/actions/badge.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ func GetWorkflowBadge(ctx *context.Context) {
3131
}
3232
if len(tags) != 0 {
3333
tag = tags[0].Name
34+
} else {
35+
tag = "" // return empty result on no tag
3436
}
3537
ref = fmt.Sprintf("refs/tags/%s", tag)
3638
case tag != "":

0 commit comments

Comments
 (0)