mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-08 17:05:45 +02:00
refactor: rename Number to Index
This commit is contained in:
parent
2c686e8826
commit
d5e6d959eb
@ -331,7 +331,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask
|
||||
steps[i] = &ActionTaskStep{
|
||||
Name: v.String(),
|
||||
TaskID: task.ID,
|
||||
Number: int64(i),
|
||||
Index: int64(i),
|
||||
RepoID: task.RepoID,
|
||||
Status: StatusWaiting,
|
||||
}
|
||||
@ -419,7 +419,7 @@ func UpdateTaskByState(ctx context.Context, state *runnerv1.TaskState) (*ActionT
|
||||
prevStepDone := true
|
||||
for _, step := range task.Steps {
|
||||
var result runnerv1.Result
|
||||
if v, ok := stepStates[step.Number]; ok {
|
||||
if v, ok := stepStates[step.Index]; ok {
|
||||
result = v.Result
|
||||
step.LogIndex = v.LogIndex
|
||||
step.LogLength = v.LogLength
|
||||
|
@ -15,8 +15,8 @@ import (
|
||||
type ActionTaskStep struct {
|
||||
ID int64
|
||||
Name string `xorm:"VARCHAR(255)"`
|
||||
TaskID int64 `xorm:"index unique(task_number)"`
|
||||
Number int64 `xorm:"index unique(task_number)"`
|
||||
TaskID int64 `xorm:"index unique(task_index)"`
|
||||
Index int64 `xorm:"index unique(task_index)"`
|
||||
RepoID int64 `xorm:"index"`
|
||||
Status Status `xorm:"index"`
|
||||
LogIndex int64
|
||||
|
@ -131,8 +131,8 @@ func AddActionsTables(x *xorm.Engine) error {
|
||||
type ActionTaskStep struct {
|
||||
ID int64
|
||||
Name string `xorm:"VARCHAR(255)"`
|
||||
TaskID int64 `xorm:"index unique(task_number)"`
|
||||
Number int64 `xorm:"index unique(task_number)"`
|
||||
TaskID int64 `xorm:"index unique(task_index)"`
|
||||
Index int64 `xorm:"index unique(task_index)"`
|
||||
RepoID int64 `xorm:"index"`
|
||||
Status int `xorm:"index"`
|
||||
LogIndex int64
|
||||
|
Loading…
x
Reference in New Issue
Block a user