Package org.kohsuke.github
Class GHPullRequestReviewComment
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHPullRequestReviewComment
-
- All Implemented Interfaces:
Reactable
public class GHPullRequestReviewComment extends GHObject implements Reactable
Review comment to the pull request- Author:
- Julien Henry
- See Also:
GHPullRequest#listReviewComments(),GHPullRequest#createReviewComment(String, String, String, int)
-
-
Field Summary
-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Constructor Summary
Constructors Constructor Description GHPullRequestReviewComment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GHReactioncreateReaction(ReactionContent content)Leaves a reaction to this object.voiddelete()Deletes this review comment.static GHPullRequestReviewCommentdraft(String body, String path, int position)Deprecated.You should be usingGHPullRequestReviewBuilder.comment(String, String, int)protected StringgetApiRoute()Gets api route.protected StringgetApiRoute(boolean includePullNumber)Gets api route.StringgetBody()The comment itself.URLgetHtmlUrl()Gets html url.longgetInReplyToId()Gets in reply to id.intgetOriginalPosition()Gets original position.GHPullRequestgetParent()Gets the pull request to which this review comment is associated.StringgetPath()Gets path.intgetPosition()Gets position.GHUsergetUser()Gets the user who posted this comment.PagedIterable<GHReaction>listReactions()List all the reactions left to this object.GHPullRequestReviewCommentreply(String body)Create a new comment that replies to this comment.voidupdate(String body)Updates the comment.-
Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
-
-
-
Method Detail
-
draft
@Deprecated public static GHPullRequestReviewComment draft(String body, String path, int position)
Deprecated.You should be usingGHPullRequestReviewBuilder.comment(String, String, int)Draft gh pull request review comment.- Parameters:
body- the bodypath- the pathposition- the position- Returns:
- the gh pull request review comment
-
getParent
public GHPullRequest getParent()
Gets the pull request to which this review comment is associated.- Returns:
- the parent
-
getBody
public String getBody()
The comment itself.- Returns:
- the body
-
getUser
public GHUser getUser() throws IOException
Gets the user who posted this comment.- Returns:
- the user
- Throws:
IOException- the io exception
-
getPath
public String getPath()
Gets path.- Returns:
- the path
-
getPosition
@CheckForNull public int getPosition()
Gets position.- Returns:
- the position
-
getOriginalPosition
public int getOriginalPosition()
Gets original position.- Returns:
- the original position
-
getInReplyToId
@CheckForNull public long getInReplyToId()
Gets in reply to id.- Returns:
- the in reply to id
-
getHtmlUrl
public URL getHtmlUrl()
Description copied from class:GHObjectGets html url.- Specified by:
getHtmlUrlin classGHObject- Returns:
- URL of this object for humans, which renders some HTML.
-
getApiRoute
protected String getApiRoute()
Gets api route.- Returns:
- the api route
-
getApiRoute
protected String getApiRoute(boolean includePullNumber)
Gets api route.- Parameters:
includePullNumber- if true, includes the owning pull request's number in the route.- Returns:
- the api route
-
update
public void update(String body) throws IOException
Updates the comment.- Parameters:
body- the body- Throws:
IOException- the io exception
-
delete
public void delete() throws IOExceptionDeletes this review comment.- Throws:
IOException- the io exception
-
reply
public GHPullRequestReviewComment reply(String body) throws IOException
Create a new comment that replies to this comment.- Parameters:
body- the body- Returns:
- the gh pull request review comment
- Throws:
IOException- the io exception
-
createReaction
@Preview(SQUIRREL_GIRL) public GHReaction createReaction(ReactionContent content) throws IOException
Description copied from interface:ReactableLeaves a reaction to this object.- Specified by:
createReactionin interfaceReactable- Parameters:
content- the content- Returns:
- the gh reaction
- Throws:
IOException- the io exception
-
listReactions
@Preview(SQUIRREL_GIRL) public PagedIterable<GHReaction> listReactions()
Description copied from interface:ReactableList all the reactions left to this object.- Specified by:
listReactionsin interfaceReactable- Returns:
- the paged iterable
-
-