java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHCommitComment
- All Implemented Interfaces:
Reactable
A comment attached to a commit (or a specific line in a specific file of a commit.)
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Field Summary
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateReaction(ReactionContent content) Creates the reaction.voiddelete()Deletes this comment.voiddeleteReaction(GHReaction reaction) Delete reaction.getBody()Commit comment in the GitHub flavored markdown format.Gets the commit to which this comment is associated with.URL like 'https://github.com/kohsuke/sandbox-ant/commit/8ae38db0ea5837313ab5f39d43a6f73de3bd9000#commitcomment-1252827' to show this commit comment in a browser.intgetLine()A commit comment can be on a specific line of a specific file, if so, this field points to the line number in the file.getOwner()Gets owner.getPath()A commit comment can be on a specific line of a specific file, if so, this field points to a file.getSHA1()Gets sha 1.getUser()Gets the user who put this comment.List reactions.voidUpdates the body of the commit message.Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
Constructor Details
-
GHCommitComment
public GHCommitComment()Create default GHCommitComment instance
-
-
Method Details
-
createReaction
Creates the reaction.- Specified by:
createReactionin interfaceReactable- Parameters:
content- the content- Returns:
- the GH reaction
- Throws:
IOException- Signals that an I/O exception has occurred.
-
delete
Deletes this comment.- Throws:
IOException- the io exception
-
deleteReaction
Delete reaction.- Specified by:
deleteReactionin interfaceReactable- Parameters:
reaction- the reaction- Throws:
IOException- Signals that an I/O exception has occurred.
-
getBody
Commit comment in the GitHub flavored markdown format.- Returns:
- the body
-
getCommit
Gets the commit to which this comment is associated with.- Returns:
- the commit
- Throws:
IOException- the io exception
-
getHtmlUrl
URL like 'https://github.com/kohsuke/sandbox-ant/commit/8ae38db0ea5837313ab5f39d43a6f73de3bd9000#commitcomment-1252827' to show this commit comment in a browser.- Returns:
- the html url
-
getLine
public int getLine()A commit comment can be on a specific line of a specific file, if so, this field points to the line number in the file. Otherwise -1.- Returns:
- the line
-
getOwner
Gets owner.- Returns:
- the owner
-
getPath
A commit comment can be on a specific line of a specific file, if so, this field points to a file. Otherwise null.- Returns:
- the path
-
getSHA1
Gets sha 1.- Returns:
- the sha 1
-
getUser
Gets the user who put this comment.- Returns:
- the user
- Throws:
IOException- the io exception
-
listReactions
List reactions.- Specified by:
listReactionsin interfaceReactable- Returns:
- the paged iterable
-
update
Updates the body of the commit message.- Parameters:
body- the body- Throws:
IOException- the io exception
-