Skip to content

Commit

Permalink
fix: lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfogre committed Apr 10, 2023
1 parent 94f500b commit 7bebe8b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions services/actions/commit_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ func toCommitStatus(status actions_model.Status) api.CommitStatusState {

func getIndexOfJob(ctx context.Context, job *actions_model.ActionRunJob) (int, error) {
// TODO: store job index as a field in ActionRunJob to avoid this
if jobs, err := actions_model.GetRunJobsByRunID(ctx, job.RunID); err != nil {
jobs, err := actions_model.GetRunJobsByRunID(ctx, job.RunID)
if err != nil {
return 0, err
} else {
for i, v := range jobs {
if v.ID == job.ID {
return i, nil
}
}
for i, v := range jobs {
if v.ID == job.ID {
return i, nil
}
}
return 0, nil
Expand Down

0 comments on commit 7bebe8b

Please sign in to comment.