mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-27 20:49:33 +08:00
feat: return empty result on no tag
This commit is contained in:
parent
3dea5ee2fb
commit
1637d129b9
@ -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…
Reference in New Issue
Block a user