/** * Gets the last status of this commit, which is what gets shown in the UI. */ public GHCommitStatus getLastStatus() throws IOException { return owner.getLastCommitStatus(sha); }
/** * Gets the last status of this commit, which is what gets shown in the UI. */ public GHCommitStatus getLastStatus() throws IOException { return owner.getLastCommitStatus(sha); }
/** * Gets the last status of this commit, which is what gets shown in the UI. */ public GHCommitStatus getLastStatus() throws IOException { return owner.getLastCommitStatus(sha); }
public static GHCommitStatus getLastCommitStatus(GHRepository repository, GHPullRequest pullRequest) throws IOException { String commitSha = pullRequest.getHead().getRef(); return repository.getLastCommitStatus(commitSha); }
public static GHCommitStatus getLastCommitStatus(GHRepository repository, GHPullRequest pullRequest) throws IOException { String commitSha = pullRequest.getHead().getRef(); return repository.getLastCommitStatus(commitSha); }
public Map<String, List<GHCommitStatus>> getCommitStatuses() throws IOException { final GHRepository githubRepository = this.build.getGithubRepository(); final List<GHCommitStatus> commitStatuses = githubRepository.getCommit(this.build.getSha()).listStatuses().asList(); final Map<String, List<GHCommitStatus>> groupedStatuses = new HashMap<>(); for (final GHCommitStatus status : commitStatuses) { final String context = status.getContext(); if (groupedStatuses.get(context) == null) { groupedStatuses.put(context, new ArrayList<>()); } groupedStatuses.get(context).add(status); } groupedStatuses.put("- Latest Status -", Arrays.asList(githubRepository.getLastCommitStatus(this.build.getSha()))); return groupedStatuses; } }
try { GHCommitStatus status = getLastCommitStatus(ghRepository, pullRequest); ghRepository.getLastCommitStatus(pullRequest.getHead().getSha()); if (status != null) { GHCommitState state = status.getState();