Skip to content

Commit 4790d14

Browse files
lunnysilverwind
authored andcommitted
Fix the runs will not be displayed bug when the main branch have no workflows but other branches have (go-gitea#28359)
1 parent 0f2790f commit 4790d14

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

routers/web/repo/actions/actions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ func List(ctx *context.Context) {
200200
pager.AddParamString("actor", fmt.Sprint(actorID))
201201
pager.AddParamString("status", fmt.Sprint(status))
202202
ctx.Data["Page"] = pager
203+
ctx.Data["HasWorkflowsOrRuns"] = len(workflows) > 0 || len(runs) > 0
203204

204205
ctx.HTML(http.StatusOK, tplListActions)
205206
}

templates/repo/actions/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="ui container">
55
{{template "base/alert" .}}
66

7-
{{if .workflows}}
7+
{{if .HasWorkflowsOrRuns}}
88
<div class="ui stackable grid">
99
<div class="four wide column">
1010
<div class="ui fluid vertical menu">

0 commit comments

Comments
 (0)