本文整理汇总了Java中org.kohsuke.github.GHCommitState.ERROR属性的典型用法代码示例。如果您正苦于以下问题:Java GHCommitState.ERROR属性的具体用法?Java GHCommitState.ERROR怎么用?Java GHCommitState.ERROR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.kohsuke.github.GHCommitState
的用法示例。
在下文中一共展示了GHCommitState.ERROR属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: statusOf
private static GHCommitState statusOf(StageExecution stageExecution) {
if (stageExecution.isSuccessful()) {
return GHCommitState.SUCCESS;
} else if (Iterables.any(stageExecution.getBuilds(), new Predicate<BuildExecution>() {
@Override
public boolean apply(BuildExecution input) {
return input.getBuildState() == BuildState.UNKNOWN;
}
})) {
return GHCommitState.ERROR;
} else {
return GHCommitState.FAILURE;
}
}
示例2: getState
GHCommitState getState(String result) {
result = result == null ? "" : result;
GHCommitState state = GHCommitState.PENDING;
if (result.equalsIgnoreCase("Passed")) {
state = GHCommitState.SUCCESS;
} else if (result.equalsIgnoreCase("Failed")) {
state = GHCommitState.FAILURE;
} else if (result.equalsIgnoreCase("Cancelled")) {
state = GHCommitState.ERROR;
}
return state;
}
示例3: getCommitState
public static GHCommitState getCommitState(final Run<?, ?> run, final GHCommitState unstableAs) {
GHCommitState state;
Result result = run.getResult();
if (isNull(result)) {
LOG.error("{} result is null.", run);
state = GHCommitState.ERROR;
} else if (result.isBetterOrEqualTo(SUCCESS)) {
state = GHCommitState.SUCCESS;
} else if (result.isBetterOrEqualTo(UNSTABLE)) {
state = unstableAs;
} else {
state = GHCommitState.FAILURE;
}
return state;
}
示例4: doFillUnstableAsItems
@SuppressWarnings("UnusedDeclaration")
public ListBoxModel doFillUnstableAsItems() {
ListBoxModel items = new ListBoxModel();
GHCommitState[] results = new GHCommitState[] {GHCommitState.SUCCESS,GHCommitState.ERROR,GHCommitState.FAILURE};
for (GHCommitState nextResult : results) {
String text = StringUtils.capitalize(nextResult.toString().toLowerCase());
items.add(text, nextResult.toString());
if (unstableAs.toString().equals(nextResult)) {
items.get(items.size()-1).selected = true;
}
}
return items;
}
示例5: doFillResultItems
public ListBoxModel doFillResultItems(@QueryParameter String result) {
ListBoxModel items = new ListBoxModel();
GHCommitState[] results = new GHCommitState[] { GHCommitState.SUCCESS, GHCommitState.ERROR, GHCommitState.FAILURE };
for (GHCommitState nextResult : results) {
items.add(nextResult.toString(), nextResult.toString());
if (result.toString().equals(nextResult)) {
items.get(items.size() - 1).selected = true;
}
}
return items;
}
开发者ID:bratchenko,项目名称:jenkins-github-pull-request-comments,代码行数:13,代码来源:GhprcBuildResultMessage.java
示例6: getStatus
public GHCommitState getStatus() {
return (newIssues(Severity.BLOCKER) > 0 || newIssues(Severity.CRITICAL) > 0) ? GHCommitState.ERROR : GHCommitState.SUCCESS;
}
示例7: unstableAsError
public void unstableAsError() {
this.state = GHCommitState.ERROR;
}