Skip to content

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

Support create task check run comment

天舟eb3fe0291fe0
diff --git a/api/task_check_run.go b/api/task_check_run.go
index 4aa697bcd1..1b856a3d46 100644
--- a/api/task_check_run.go
+++ b/api/task_check_run.go
@@ -105,6 +105,7 @@ type TaskCheckRunCreate struct {
// Domain specific fields
Name string `jsonapi:"attr,name"`
Type TaskCheckType `jsonapi:"attr,type"`
+ Comment string `jsonapi:"attr,comment"`
Payload string `jsonapi:"attr,payload"`
// If true, then we will skip creating the task check run if there has already been a DONE check run
diff --git a/store/task_check_run.go b/store/task_check_run.go
index 799789e1f8..65136308c8 100644
--- a/store/task_check_run.go
+++ b/store/task_check_run.go
@@ -94,9 +94,10 @@ func (s *TaskCheckRunService) CreateTaskCheckRunTx(ctx context.Context, tx *sql.
name,
`+"`status`,"+`
`+"`type`,"+`
+ comment,
payload
)
- VALUES (?, ?, ?, ?, 'RUNNING', ?, ?)
+ VALUES (?, ?, ?, ?, 'RUNNING', ?, ?, ?)
RETURNING id, creator_id, created_ts, updater_id, updated_ts, task_id, name, `+"`status`, `type`, comment, result, payload"+`
`,
create.CreatorId,
@@ -104,6 +105,7 @@ func (s *TaskCheckRunService) CreateTaskCheckRunTx(ctx context.Context, tx *sql.
create.TaskId,
create.Name,
create.Type,
+ create.Comment,
create.Payload,
)