Package org.kohsuke.github
Class GHPullRequestReviewBuilder
- java.lang.Object
-
- org.kohsuke.github.GHPullRequestReviewBuilder
-
public class GHPullRequestReviewBuilder extends Object
Builds up a creation of newGHPullRequestReview
.- Author:
- Kohsuke Kawaguchi
- See Also:
GHPullRequest#createReview()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GHPullRequestReviewBuilder
body(String body)
Required when using REQUEST_CHANGES or COMMENT for the event parameter.GHPullRequestReviewBuilder
comment(String body, String path, int position)
Comment gh pull request review builder.GHPullRequestReviewBuilder
commitId(String commitId)
The SHA of the commit that needs a review.GHPullRequestReview
create()
Create gh pull request review.GHPullRequestReviewBuilder
event(GHPullRequestReviewEvent event)
The review action you want to perform.
-
-
-
Method Detail
-
commitId
public GHPullRequestReviewBuilder commitId(String commitId)
The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the position. Defaults to the most recent commit in the pull request when you do not specify a value.- Parameters:
commitId
- the commit id- Returns:
- the gh pull request review builder
-
body
public GHPullRequestReviewBuilder body(String body)
Required when using REQUEST_CHANGES or COMMENT for the event parameter. The body text of the pull request review.- Parameters:
body
- the body- Returns:
- the gh pull request review builder
-
event
public GHPullRequestReviewBuilder event(GHPullRequestReviewEvent event)
The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. By leaving this blank, you set the review action state to PENDING, which means you will need to submit the pull request review when you are ready.- Parameters:
event
- the event- Returns:
- the gh pull request review builder
-
comment
public GHPullRequestReviewBuilder comment(String body, String path, int position)
Comment gh pull request review builder.- Parameters:
body
- The relative path to the file that necessitates a review comment.path
- The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.position
- Text of the review comment.- Returns:
- the gh pull request review builder
-
create
public GHPullRequestReview create() throws IOException
Create gh pull request review.- Returns:
- the gh pull request review
- Throws:
IOException
- the io exception
-
-