Package org.kohsuke.github
Class GHPullRequestReview
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHPullRequestReview
-
public class GHPullRequestReview extends GHObject
Review to a pull request.
-
-
Field Summary
-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Constructor Summary
Constructors Constructor Description GHPullRequestReview()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
delete()
Deletes this review.void
dismiss(String message)
Dismisses this review.protected String
getApiRoute()
Gets api route.String
getBody()
The comment itself.String
getCommitId()
Gets commit id.Date
getCreatedAt()
Since this method does not exist, we forward this value.URL
getHtmlUrl()
Gets html url.GHPullRequest
getParent()
Gets the pull request to which this review is associated.GHPullRequestReviewState
getState()
Gets state.Date
getSubmittedAt()
When was this resource created?GHUser
getUser()
Gets the user who posted this review.PagedIterable<GHPullRequestReviewComment>
listReviewComments()
Obtains all the review comments associated with this pull request review.void
submit(String body, GHPullRequestReviewEvent event)
Updates the comment.void
submit(String body, GHPullRequestReviewState state)
Deprecated.Former preview method that changed when it got public.-
Methods inherited from class org.kohsuke.github.GHObject
getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
-
-
-
Method Detail
-
getParent
public GHPullRequest getParent()
Gets the pull request to which this review 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 review.- Returns:
- the user
- Throws:
IOException
- the io exception
-
getCommitId
public String getCommitId()
Gets commit id.- Returns:
- the commit id
-
getState
@CheckForNull public GHPullRequestReviewState getState()
Gets state.- Returns:
- the state
-
getHtmlUrl
public URL getHtmlUrl()
Description copied from class:GHObject
Gets html url.- Specified by:
getHtmlUrl
in classGHObject
- Returns:
- URL of this object for humans, which renders some HTML.
-
getApiRoute
protected String getApiRoute()
Gets api route.- Returns:
- the api route
-
getSubmittedAt
public Date getSubmittedAt() throws IOException
When was this resource created?- Returns:
- the submitted at
- Throws:
IOException
- the io exception
-
getCreatedAt
public Date getCreatedAt() throws IOException
Since this method does not exist, we forward this value.- Overrides:
getCreatedAt
in classGHObject
- Returns:
- date created
- Throws:
IOException
- on error
-
submit
@Deprecated public void submit(String body, GHPullRequestReviewState state) throws IOException
Deprecated.Former preview method that changed when it got public. Left here for backward compatibility. Usesubmit(String, GHPullRequestReviewEvent)
Submit.- Parameters:
body
- the bodystate
- the state- Throws:
IOException
- the io exception
-
submit
public void submit(String body, GHPullRequestReviewEvent event) throws IOException
Updates the comment.- Parameters:
body
- the bodyevent
- the event- Throws:
IOException
- the io exception
-
delete
public void delete() throws IOException
Deletes this review.- Throws:
IOException
- the io exception
-
dismiss
public void dismiss(String message) throws IOException
Dismisses this review.- Parameters:
message
- the message- Throws:
IOException
- the io exception
-
listReviewComments
public PagedIterable<GHPullRequestReviewComment> listReviewComments() throws IOException
Obtains all the review comments associated with this pull request review.- Returns:
- the paged iterable
- Throws:
IOException
- the io exception
-
-