We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94f500b commit 7bebe8bCopy full SHA for 7bebe8b
services/actions/commit_status.go
@@ -150,13 +150,13 @@ func toCommitStatus(status actions_model.Status) api.CommitStatusState {
150
151
func getIndexOfJob(ctx context.Context, job *actions_model.ActionRunJob) (int, error) {
152
// TODO: store job index as a field in ActionRunJob to avoid this
153
- if jobs, err := actions_model.GetRunJobsByRunID(ctx, job.RunID); err != nil {
+ jobs, err := actions_model.GetRunJobsByRunID(ctx, job.RunID)
154
+ if err != nil {
155
return 0, err
- } else {
156
- for i, v := range jobs {
157
- if v.ID == job.ID {
158
- return i, nil
159
- }
+ }
+ for i, v := range jobs {
+ if v.ID == job.ID {
+ return i, nil
160
}
161
162
return 0, nil
0 commit comments