public class GHCommit
extends java.lang.Object
GHRepository.getCommit(String),
GHCommitComment.getCommit()| Modifier and Type | Class and Description |
|---|---|
static class |
GHCommit.File
A file that was modified.
|
static class |
GHCommit.GHAuthor
Deprecated.
Use
GitUser instead. |
static class |
GHCommit.Parent |
static class |
GHCommit.ShortInfo
Short summary of this commit.
|
static class |
GHCommit.Stats |
| Constructor and Description |
|---|
GHCommit() |
| Modifier and Type | Method and Description |
|---|---|
GHCommitComment |
createComment(java.lang.String body) |
GHCommitComment |
createComment(java.lang.String body,
java.lang.String path,
java.lang.Integer line,
java.lang.Integer position)
Creates a commit comment.
|
GHUser |
getAuthor() |
java.util.Date |
getAuthoredDate()
Gets the date the change was authored on.
|
java.util.Date |
getCommitDate()
Gets the date the change was committed on.
|
GHCommit.ShortInfo |
getCommitShortInfo() |
GHUser |
getCommitter() |
java.util.List<GHCommit.File> |
getFiles()
List of files changed/added/removed in this commit.
|
java.net.URL |
getHtmlUrl()
URL of this commit like "https://github.com/kohsuke/sandbox-ant/commit/8ae38db0ea5837313ab5f39d43a6f73de3bd9000"
|
GHCommitStatus |
getLastStatus()
Gets the last status of this commit, which is what gets shown in the UI.
|
int |
getLinesAdded()
Number of lines added.
|
int |
getLinesChanged()
Number of lines added + removed.
|
int |
getLinesDeleted()
Number of lines removed.
|
GHRepository |
getOwner()
The repository that contains the commit.
|
java.util.List<GHCommit> |
getParents()
Resolves the parent commit objects and return them.
|
java.util.List<java.lang.String> |
getParentSHA1s()
Returns the SHA1 of parent commit objects.
|
java.lang.String |
getSHA1()
[0-9a-f]{40} SHA1 checksum.
|
PagedIterable<GHCommitComment> |
listComments()
Lists up all the commit comments in this repository.
|
PagedIterable<GHCommitStatus> |
listStatuses()
Gets the status of this commit, newer ones first.
|
public GHCommit.ShortInfo getCommitShortInfo() throws java.io.IOException
java.io.IOExceptionpublic GHRepository getOwner()
public int getLinesChanged()
throws java.io.IOException
java.io.IOExceptionpublic int getLinesAdded()
throws java.io.IOException
java.io.IOExceptionpublic int getLinesDeleted()
throws java.io.IOException
java.io.IOExceptionpublic java.net.URL getHtmlUrl()
public java.lang.String getSHA1()
public java.util.List<GHCommit.File> getFiles() throws java.io.IOException
java.io.IOExceptionpublic java.util.List<java.lang.String> getParentSHA1s()
public java.util.List<GHCommit> getParents() throws java.io.IOException
java.io.IOExceptionpublic GHUser getAuthor() throws java.io.IOException
java.io.IOExceptionpublic java.util.Date getAuthoredDate()
throws java.io.IOException
java.io.IOException - if the information was not already fetched and an attempt at fetching the information failed.public GHUser getCommitter() throws java.io.IOException
java.io.IOExceptionpublic java.util.Date getCommitDate()
throws java.io.IOException
java.io.IOException - if the information was not already fetched and an attempt at fetching the information failed.public PagedIterable<GHCommitComment> listComments()
public GHCommitComment createComment(java.lang.String body, java.lang.String path, java.lang.Integer line, java.lang.Integer position) throws java.io.IOException
java.io.IOExceptionpublic GHCommitComment createComment(java.lang.String body) throws java.io.IOException
java.io.IOExceptionpublic PagedIterable<GHCommitStatus> listStatuses() throws java.io.IOException
java.io.IOExceptionpublic GHCommitStatus getLastStatus() throws java.io.IOException
java.io.IOExceptionCopyright © 2016. All Rights Reserved.