当前位置: 首页>>代码示例>>Java>>正文


Java GHCommitState.ERROR属性代码示例

本文整理汇总了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;
    }
}
 
开发者ID:HackAttack,项目名称:bamboo-github-status,代码行数:14,代码来源:GitHubStatusPostStage.java

示例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;
}
 
开发者ID:gocd-contrib,项目名称:gocd-build-status-notifier,代码行数:12,代码来源:GitHubProvider.java

示例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;
}
 
开发者ID:KostyaSha,项目名称:github-integration-plugin,代码行数:15,代码来源:JobHelper.java

示例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;
}
 
开发者ID:bratchenko,项目名称:jenkins-github-pull-request-comments,代码行数:14,代码来源:GhprcTrigger.java

示例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;
}
 
开发者ID:SonarSource,项目名称:sonar-github,代码行数:3,代码来源:GlobalReport.java

示例7: unstableAsError

public void unstableAsError() {
    this.state = GHCommitState.ERROR;
}
 
开发者ID:KostyaSha,项目名称:github-integration-plugin,代码行数:3,代码来源:GitHubPRStatusPublisherDslContext.java


注:本文中的org.kohsuke.github.GHCommitState.ERROR属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。