From 6cdbf3e9865d71926d5828d60bc4357391bd8741 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Thu, 20 Oct 2022 18:35:09 +0800 Subject: [PATCH] fix: use new Status --- models/bots/run.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/models/bots/run.go b/models/bots/run.go index 99a9cee4b5..c2df288632 100644 --- a/models/bots/run.go +++ b/models/bots/run.go @@ -9,7 +9,6 @@ import ( "fmt" "time" - "code.gitea.io/gitea/core" "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" @@ -98,14 +97,8 @@ func updateRepoRunsNumbers(ctx context.Context, repo *repo_model.Repository) err builder.Select("count(*)").From("bots_run"). Where(builder.Eq{ "repo_id": repo.ID, - }.And( - builder.In("status", - core.StatusFailing, - core.StatusKilled, - core.StatusPassing, - core.StatusError, - ), - ), + "status": StatusFailure, + }, ), ). Update(repo)