public class GHCommit extends 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
The type Parent.
|
static class |
GHCommit.ShortInfo
Short summary of this commit.
|
static class |
GHCommit.Stats
The type Stats.
|
| Constructor and Description |
|---|
GHCommit() |
| Modifier and Type | Method and Description |
|---|---|
GHCommitComment |
createComment(String body)
Create comment gh commit comment.
|
GHCommitComment |
createComment(String body,
String path,
Integer line,
Integer position)
Creates a commit comment.
|
GHUser |
getAuthor()
Gets author.
|
Date |
getAuthoredDate()
Gets the date the change was authored on.
|
Date |
getCommitDate()
Gets the date the change was committed on.
|
GHCommit.ShortInfo |
getCommitShortInfo()
Gets commit short info.
|
GHUser |
getCommitter()
Gets committer.
|
List<GHCommit.File> |
getFiles()
List of files changed/added/removed in this commit.
|
URL |
getHtmlUrl()
Gets html url.
|
GHCommitStatus |
getLastStatus()
Gets last status.
|
int |
getLinesAdded()
Gets lines added.
|
int |
getLinesChanged()
Gets lines changed.
|
int |
getLinesDeleted()
Gets lines deleted.
|
GHRepository |
getOwner()
Gets owner.
|
List<GHCommit> |
getParents()
Resolves the parent commit objects and return them.
|
List<String> |
getParentSHA1s()
Gets parent sha 1 s.
|
String |
getSHA1()
Gets sha 1.
|
GHTree |
getTree()
Use this method to walk the tree.
|
PagedIterable<GHCommitComment> |
listComments()
List comments paged iterable.
|
PagedIterable<GHCommitStatus> |
listStatuses()
List statuses paged iterable.
|
public GHCommit.ShortInfo getCommitShortInfo() throws IOException
IOException - the io exceptionpublic GHRepository getOwner()
public int getLinesChanged()
throws IOException
IOException - if the field was not populated and refresh failspublic int getLinesAdded()
throws IOException
IOException - if the field was not populated and refresh failspublic int getLinesDeleted()
throws IOException
IOException - if the field was not populated and refresh failspublic GHTree getTree() throws IOException
IOException - on errorpublic URL getHtmlUrl()
public String getSHA1()
public List<GHCommit.File> getFiles() throws IOException
IOException - on errorpublic List<String> getParentSHA1s()
public List<GHCommit> getParents() throws IOException
IOException - on errorpublic GHUser getAuthor() throws IOException
IOException - the io exceptionpublic Date getAuthoredDate() throws IOException
IOException - if the information was not already fetched and an attempt at fetching the information failed.public GHUser getCommitter() throws IOException
IOException - the io exceptionpublic Date getCommitDate() throws IOException
IOException - if the information was not already fetched and an attempt at fetching the information failed.public PagedIterable<GHCommitComment> listComments()
PagedIterable with all the commit comments in this repository.public GHCommitComment createComment(String body, String path, Integer line, Integer position) throws IOException
I'm not sure how path/line/position parameters interact with each other.
body - body of the commentpath - path of file being commented online - target line for commentposition - position on lineIOException - if comment is not createdpublic GHCommitComment createComment(String body) throws IOException
body - the bodyIOException - the io exceptionpublic PagedIterable<GHCommitStatus> listStatuses() throws IOException
IOException - if statuses cannot be readpublic GHCommitStatus getLastStatus() throws IOException
IOException - on errorCopyright © 2020. All rights reserved.