Skip to content

Commit dc003e4

Browse files
committed
fix lint
1 parent ca18672 commit dc003e4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

services/actions/job_emitter.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ func checkRunConcurrency(ctx context.Context, run *actions_model.ActionRun) (job
126126
return nil, nil, fmt.Errorf("find blocked run by concurrency: %w", err)
127127
}
128128
if found && !concurrentRun.NeedApproval {
129-
if js, ujs, err := checkJobsOfRun(ctx, concurrentRun); err != nil {
129+
js, ujs, err := checkJobsOfRun(ctx, concurrentRun)
130+
if err != nil {
130131
return nil, nil, err
131-
} else {
132-
jobs = append(jobs, js...)
133-
updatedJobs = append(updatedJobs, ujs...)
134132
}
133+
jobs = append(jobs, js...)
134+
updatedJobs = append(updatedJobs, ujs...)
135135
}
136136
checkedConcurrencyGroup.Add(run.ConcurrencyGroup)
137137
}
@@ -153,16 +153,16 @@ func checkRunConcurrency(ctx context.Context, run *actions_model.ActionRun) (job
153153
return nil, nil, fmt.Errorf("find blocked run by concurrency: %w", err)
154154
}
155155
if found && !concurrentRun.NeedApproval {
156-
if js, ujs, err := checkJobsOfRun(ctx, concurrentRun); err != nil {
156+
js, ujs, err := checkJobsOfRun(ctx, concurrentRun)
157+
if err != nil {
157158
return nil, nil, err
158-
} else {
159-
jobs = append(jobs, js...)
160-
updatedJobs = append(updatedJobs, ujs...)
161159
}
160+
jobs = append(jobs, js...)
161+
updatedJobs = append(updatedJobs, ujs...)
162162
}
163163
checkedConcurrencyGroup.Add(job.ConcurrencyGroup)
164164
}
165-
return
165+
return jobs, updatedJobs, nil
166166
}
167167

168168
func checkJobsOfRun(ctx context.Context, run *actions_model.ActionRun) (jobs, updatedJobs []*actions_model.ActionRunJob, err error) {

0 commit comments

Comments
 (0)