Skip to content

Commit

Permalink
fix bug condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bootjp committed Mar 23, 2021
1 parent b65773a commit ffea4d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func IsConsecutiveFailJob(job *gojenkins.Job) (bool, error) {
return false, err
}

if len(buildIds) > 0 {
if len(buildIds) == 0 {
return false, nil
}

Expand Down
11 changes: 11 additions & 0 deletions detector_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package main

import "testing"

func TestIsConsecutiveFailJob(t *testing.T) {

}

func TestIsOverHoursFailedJob(t *testing.T) {

}

0 comments on commit ffea4d5

Please sign in to comment.