public boolean isCommitStatusOK(String githubRepo, String sha) { Optional<CommitDetails> commit = getCommitDetails(githubRepo, sha); if (commit.isPresent()) { return commit.get().getCommitStatus().getState() == GHCommitState.SUCCESS; } return false; }
GHCommitState state = status.getState(); String key = status.getTargetUrl(); if (key == null) {
GHCommitStatus status = getLastCommitStatus(ghRepository, pullRequest); if (status != null) { GHCommitState state = status.getState(); if (state != null && state.equals(GHCommitState.SUCCESS)) { String message = Markdown.UPDATEBOT_ICON + " merging this pull request as its CI was successful";
ghRepository.getLastCommitStatus(pullRequest.getHead().getSha()); if (status != null) { GHCommitState state = status.getState(); if (state != null && state.equals(GHCommitState.SUCCESS) && GitHubHelpers.checkCommitStatus(ghRepository,pullRequest,GHCommitState.SUCCESS)) { String message = Markdown.UPDATEBOT_ICON + " merging this pull request as its CI was successful";