Skip to content

Commit dcd8011

Browse files
committed
fix comment
1 parent 096bd4a commit dcd8011

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/actions/task_state.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ func FullSteps(task *actions_model.ActionTask) []*actions_model.ActionTaskStep {
2323
// 1. preStep(Success) -> step1(Success) -> step2(Running) -> step3(Waiting) -> postStep(Waiting): firstStep is step1.
2424
// 2. preStep(Success) -> step1(Skipped) -> step2(Success) -> postStep(Success): firstStep is step2.
2525
// 3. preStep(Success) -> step1(Running) -> step2(Waiting) -> postStep(Waiting): firstStep is step1.
26-
// 3. preStep(Success) -> step1(Skipped) -> step2(Skipped) -> postStep(Skipped): firstStep is nil.
26+
// 4. preStep(Success) -> step1(Skipped) -> step2(Skipped) -> postStep(Skipped): firstStep is nil.
27+
// 5. preStep(Success) -> step1(Cancelled) -> step2(Cancelled) -> postStep(Cancelled): firstStep is nil.
2728
var firstStep *actions_model.ActionTaskStep
2829
// lastHasRunStep is the last step that has run.
2930
// For example,
@@ -51,6 +52,7 @@ func FullSteps(task *actions_model.ActionTask) []*actions_model.ActionTaskStep {
5152
Status: actions_model.StatusRunning,
5253
}
5354

55+
// No step has run or is running, so preStep is equal to the task
5456
if firstStep == nil {
5557
preStep.Stopped = task.Stopped
5658
preStep.Status = task.Status

0 commit comments

Comments
 (0)