Skip to content

Commit 7bebe8b

Browse files
committed
fix: lint code
1 parent 94f500b commit 7bebe8b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

services/actions/commit_status.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ func toCommitStatus(status actions_model.Status) api.CommitStatusState {
150150

151151
func getIndexOfJob(ctx context.Context, job *actions_model.ActionRunJob) (int, error) {
152152
// TODO: store job index as a field in ActionRunJob to avoid this
153-
if jobs, err := actions_model.GetRunJobsByRunID(ctx, job.RunID); err != nil {
153+
jobs, err := actions_model.GetRunJobsByRunID(ctx, job.RunID)
154+
if err != nil {
154155
return 0, err
155-
} else {
156-
for i, v := range jobs {
157-
if v.ID == job.ID {
158-
return i, nil
159-
}
156+
}
157+
for i, v := range jobs {
158+
if v.ID == job.ID {
159+
return i, nil
160160
}
161161
}
162162
return 0, nil

0 commit comments

Comments
 (0)