feat: return empty result on no tag

pull/32451/head
BoYanZh 1 week ago
parent 3dea5ee2fb
commit 1637d129b9
No known key found for this signature in database
GPG Key ID: CA088E6D9284F870
  1. 2
      routers/web/repo/actions/badge.go

@ -31,6 +31,8 @@ func GetWorkflowBadge(ctx *context.Context) {
}
if len(tags) != 0 {
tag = tags[0].Name
} else {
tag = "" // return empty result on no tag
}
ref = fmt.Sprintf("refs/tags/%s", tag)
case tag != "":

Loading…
Cancel
Save