mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-18 22:54:17 +09:00
feat: update step state
This commit is contained in:
@ -5,6 +5,8 @@
|
||||
package bots
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/modules/timeutil"
|
||||
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
|
||||
@ -32,3 +34,8 @@ func (TaskStep) TableName() string {
|
||||
func init() {
|
||||
db.RegisterModel(new(TaskStep))
|
||||
}
|
||||
|
||||
func GetTaskStepsByTaskID(ctx context.Context, taskID int64) ([]*TaskStep, error) {
|
||||
var steps []*TaskStep
|
||||
return steps, db.GetEngine(ctx).Where("task_id=?", taskID).OrderBy("number").Find(&steps)
|
||||
}
|
||||
|
Reference in New Issue
Block a user