@Override public GitCommit commit(String refName) throws GitException { checkProject(); try { List<GitlabCommit> lastCommits = connect.getLastCommits(project.getId(), refName); GitlabCommit gitlabCommit = lastCommits.get(0); String commitId = gitlabCommit.getId(); String commitMessage = gitlabCommit.getMessage(); String commitAuthorEmail = gitlabCommit.getAuthorEmail(); return new GitCommit(commitId, commitMessage, commitAuthorEmail); } catch (IOException e) { throw new GitException(e.getMessage()); } }
@Override public boolean equals(Object obj) { // we say that two commit objects are equal iff they have the same ID // this prevents us from having to do clever workarounds for // https://gitlab.com/gitlab-org/gitlab-ce/issues/759 try { GitlabCommit commitObj = (GitlabCommit) obj; return (this.getId().compareTo(commitObj.getId()) == 0); } catch (ClassCastException e) { return false; } }
@Override public boolean equals(Object obj) { // we say that two commit objects are equal iff they have the same ID // this prevents us from having to do clever workarounds for // https://gitlab.com/gitlab-org/gitlab-ce/issues/759 try { GitlabCommit commitObj = (GitlabCommit) obj; return (this.getId().compareTo(commitObj.getId()) == 0); } catch (ClassCastException e) { return false; } }
@Override public boolean equals(Object obj) { // we say that two commit objects are equal iff they have the same ID // this prevents us from having to do clever workarounds for // https://gitlab.com/gitlab-org/gitlab-ce/issues/759 try { GitlabCommit commitObj = (GitlabCommit) obj; return (this.getId().compareTo(commitObj.getId()) == 0); } catch (ClassCastException e) { return false; } }
@Override public int hashCode() { return this.getId().hashCode(); }
@Override public int hashCode() { return this.getId().hashCode(); }
@Override public int hashCode() { return this.getId().hashCode(); }
private void setAReachableLatestCommit() { ((GitlabMergeRequestStatus) getField(subject, "mergeRequestStatus")).setLatestCommitOfMergeRequest( mergeRequest.getId().toString(), commit.getId()); } }
build(customParameters, latestCommit.getId(), gitlabMergeRequest); } catch (IOException e) { LOGGER.log(Level.SEVERE, "Failed to fetch commits for Merge Request " + gitlabMergeRequest.getIid());