Skip to content

Commit

Permalink
Use status not_found instead of pending if there is currently no buil…
Browse files Browse the repository at this point in the history
…d for a given commit sha1 (fixes #159)
  • Loading branch information
coder-hugo committed Mar 10, 2016
1 parent d290997 commit 3d533fd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private boolean hasGitSCM(SCMTriggerItem item) {

private BuildStatus getStatus(AbstractBuild<?, ?> build) {
if (build == null) {
return BuildStatus.PENDING;
return BuildStatus.NOT_FOUND;
} else if (build.isBuilding()) {
return BuildStatus.RUNNING;
} else if (build.getResult() == Result.ABORTED) {
Expand All @@ -61,7 +61,7 @@ private BuildStatus getStatus(AbstractBuild<?, ?> build) {
}

protected enum BuildStatus {
PENDING("pending"), RUNNING("running"), CANCELED("canceled"), SUCCESS("success"), FAILED("failed"), UNSTABLE("failed");
NOT_FOUND("not_found"), RUNNING("running"), CANCELED("canceled"), SUCCESS("success"), FAILED("failed"), UNSTABLE("failed");

private String value;

Expand Down

0 comments on commit 3d533fd

Please sign in to comment.