Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Should include taskRunType when searching the ongoing taskCheckRun

天舟c41080839574
diff --git a/api/task_check_run.go b/api/task_check_run.go
index 1b856a3d46..828abc82de 100644
--- a/api/task_check_run.go
+++ b/api/task_check_run.go
@@ -120,6 +120,7 @@ type TaskCheckRunFind struct {
// Related fields
TaskId *int
+ Type *TaskCheckType
// Domain specific fields
StatusList *[]TaskCheckRunStatus
diff --git a/store/task_check_run.go b/store/task_check_run.go
index 65136308c8..f0bf07ecd1 100644
--- a/store/task_check_run.go
+++ b/store/task_check_run.go
@@ -40,6 +40,7 @@ func (s *TaskCheckRunService) CreateTaskCheckRunIfNeeded(ctx context.Context, cr
}
taskCheckRunFind := &api.TaskCheckRunFind{
TaskId: &create.TaskId,
+ Type: &create.Type,
StatusList: &statusList,
}
@@ -256,6 +257,9 @@ func (s *TaskCheckRunService) findTaskCheckRunList(ctx context.Context, tx *sql.
if v := find.TaskId; v != nil {
where, args = append(where, "task_id = ?"), append(args, *v)
}
+ if v := find.Type; v != nil {
+ where, args = append(where, "`type` = ?"), append(args, *v)
+ }
if v := find.StatusList; v != nil {
list := []string{}
for _, status := range *v {