Skip to content

Commit

Permalink
Add failed state to travis status check
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Matt committed Feb 26, 2018
1 parent 26d43c8 commit d94db2f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions travis.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ func (request *TravisRequest) Run(token string, matrix []string, pr *github.Pull
var passed int
for _, build := range status.Builds {
// canceled, passed, errored, started
if build.State == "canceled" || build.State == "errored" {
switch build.State {
case "canceled":
fallthrough
case "errored":
fallthrough
case "failed":
failure = true
}
if build.State == "passed" {
case "passed":
passed += 1
}
}
Expand Down

0 comments on commit d94db2f

Please sign in to comment.