Skip to content

Commit b7e3adc

Browse files
GiteaBotlunny
andauthored
Fix the runs will not be displayed bug when the main branch have no workflows but other branches have (go-gitea#28359) (go-gitea#28365)
Backport go-gitea#28359 by @lunny The left menu will only display the default branch's workflows but the right side will display the runs triggered by all branches' workflows. So we cannot hide right side if default branch has no workflows. Fix go-gitea#28332 Replace go-gitea#28333 Co-authored-by: Lunny Xiao <[email protected]>
1 parent 5b5f8aa commit b7e3adc

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
@@ -201,6 +201,7 @@ func List(ctx *context.Context) {
201201
pager.AddParamString("actor", fmt.Sprint(actorID))
202202
pager.AddParamString("status", fmt.Sprint(status))
203203
ctx.Data["Page"] = pager
204+
ctx.Data["HasWorkflowsOrRuns"] = len(workflows) > 0 || len(runs) > 0
204205

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

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)