mirror of
https://github.com/go-gitea/gitea.git
synced 2025-05-18 00:49:09 -04: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{
|
steps[i] = &ActionTaskStep{
|
||||||
Name: v.String(),
|
Name: v.String(),
|
||||||
TaskID: task.ID,
|
TaskID: task.ID,
|
||||||
Number: int64(i),
|
Index: int64(i),
|
||||||
RepoID: task.RepoID,
|
RepoID: task.RepoID,
|
||||||
Status: StatusWaiting,
|
Status: StatusWaiting,
|
||||||
}
|
}
|
||||||
@ -419,7 +419,7 @@ func UpdateTaskByState(ctx context.Context, state *runnerv1.TaskState) (*ActionT
|
|||||||
prevStepDone := true
|
prevStepDone := true
|
||||||
for _, step := range task.Steps {
|
for _, step := range task.Steps {
|
||||||
var result runnerv1.Result
|
var result runnerv1.Result
|
||||||
if v, ok := stepStates[step.Number]; ok {
|
if v, ok := stepStates[step.Index]; ok {
|
||||||
result = v.Result
|
result = v.Result
|
||||||
step.LogIndex = v.LogIndex
|
step.LogIndex = v.LogIndex
|
||||||
step.LogLength = v.LogLength
|
step.LogLength = v.LogLength
|
||||||
|
@ -15,8 +15,8 @@ import (
|
|||||||
type ActionTaskStep struct {
|
type ActionTaskStep struct {
|
||||||
ID int64
|
ID int64
|
||||||
Name string `xorm:"VARCHAR(255)"`
|
Name string `xorm:"VARCHAR(255)"`
|
||||||
TaskID int64 `xorm:"index unique(task_number)"`
|
TaskID int64 `xorm:"index unique(task_index)"`
|
||||||
Number int64 `xorm:"index unique(task_number)"`
|
Index int64 `xorm:"index unique(task_index)"`
|
||||||
RepoID int64 `xorm:"index"`
|
RepoID int64 `xorm:"index"`
|
||||||
Status Status `xorm:"index"`
|
Status Status `xorm:"index"`
|
||||||
LogIndex int64
|
LogIndex int64
|
||||||
|
@ -131,8 +131,8 @@ func AddActionsTables(x *xorm.Engine) error {
|
|||||||
type ActionTaskStep struct {
|
type ActionTaskStep struct {
|
||||||
ID int64
|
ID int64
|
||||||
Name string `xorm:"VARCHAR(255)"`
|
Name string `xorm:"VARCHAR(255)"`
|
||||||
TaskID int64 `xorm:"index unique(task_number)"`
|
TaskID int64 `xorm:"index unique(task_index)"`
|
||||||
Number int64 `xorm:"index unique(task_number)"`
|
Index int64 `xorm:"index unique(task_index)"`
|
||||||
RepoID int64 `xorm:"index"`
|
RepoID int64 `xorm:"index"`
|
||||||
Status int `xorm:"index"`
|
Status int `xorm:"index"`
|
||||||
LogIndex int64
|
LogIndex int64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user