diff --git a/models/bots/run.go b/models/bots/run.go
index 03170748c1..6236165995 100644
--- a/models/bots/run.go
+++ b/models/bots/run.go
@@ -105,8 +105,14 @@ func updateRepoRunsNumbers(ctx context.Context, repo *repo_model.Repository) err
builder.Select("count(*)").From("bots_run").
Where(builder.Eq{
"repo_id": repo.ID,
- "status": StatusFailure,
- },
+ }.And(
+ builder.In("status",
+ StatusSuccess,
+ StatusFailure,
+ StatusCancelled,
+ StatusSkipped,
+ ),
+ ),
),
).
Update(repo)
diff --git a/routers/web/repo/builds/builds.go b/routers/web/repo/builds/builds.go
index 3d6b85b681..4c6584716d 100644
--- a/routers/web/repo/builds/builds.go
+++ b/routers/web/repo/builds/builds.go
@@ -99,6 +99,7 @@ func List(ctx *context.Context) {
opts.IsClosed = util.OptionalBoolNone
if ctx.FormString("state") == "closed" {
opts.IsClosed = util.OptionalBoolTrue
+ ctx.Data["IsShowClosed"] = true
} else {
opts.IsClosed = util.OptionalBoolFalse
}
diff --git a/templates/repo/builds/openclose.tmpl b/templates/repo/builds/openclose.tmpl
index f468dd3fa8..35ace3feb8 100644
--- a/templates/repo/builds/openclose.tmpl
+++ b/templates/repo/builds/openclose.tmpl
@@ -3,7 +3,7 @@
{{svg "octicon-issue-opened" 16 "mr-3"}}
{{.locale.Tr "repo.builds.open_tab" $.NumOpenRuns}}
-
+
{{svg "octicon-issue-closed" 16 "mr-3"}}
{{.locale.Tr "repo.builds.closed_tab" $.NumClosedRuns}}