We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ef43f9 commit 74aa446Copy full SHA for 74aa446
routers/web/repo/actions/actions.go
@@ -162,12 +162,18 @@ func List(ctx *context.Context) {
162
ctx.Data["NumClosedActionRuns"] = numClosedRuns
163
164
opts.IsClosed = util.OptionalBoolNone
165
- if ctx.FormString("state") == "closed" {
+ isShowClosed := ctx.FormString("state") == "closed"
166
+ if len(ctx.FormString("state")) == 0 && numOpenRuns == 0 && numClosedRuns != 0 {
167
+ isShowClosed = true
168
+ }
169
+
170
+ if isShowClosed {
171
opts.IsClosed = util.OptionalBoolTrue
172
ctx.Data["IsShowClosed"] = true
173
} else {
174
opts.IsClosed = util.OptionalBoolFalse
175
}
176
177
runs, total, err := actions_model.FindRuns(ctx, opts)
178
if err != nil {
179
ctx.Error(http.StatusInternalServerError, err.Error())
0 commit comments