java.lang.Object
org.kohsuke.github.GHPullRequestReviewBuilder
Builds up a creation of new
GHPullRequestReview
.- Author:
- Kohsuke Kawaguchi
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionRequired when using REQUEST_CHANGES or COMMENT for the event parameter.Comment gh pull request review builder.The SHA of the commit that needs a review.create()
Create gh pull request review.event
(GHPullRequestReviewEvent event) The review action you want to perform.multiLineComment
(String body, String path, int startLine, int endLine) Add a multi-line comment to the gh pull request review builder.singleLineComment
(String body, String path, int line) Add a single line comment to the gh pull request review builder.
-
Method Details
-
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
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
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
Comment gh pull request review builder.- Parameters:
body
- Text of the review comment.path
- The relative path to the file that necessitates a review comment.position
- 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.- Returns:
- the gh pull request review builder
-
multiLineComment
public GHPullRequestReviewBuilder multiLineComment(String body, String path, int startLine, int endLine) Add a multi-line comment to the gh pull request review builder.- Parameters:
body
- Text of the review comment.path
- The relative path to the file that necessitates a review comment.startLine
- The first line in the pull request diff that the multi-line comment applies to.endLine
- The last line of the range that the comment applies to.- Returns:
- the gh pull request review builder
-
singleLineComment
Add a single line comment to the gh pull request review builder.- Parameters:
body
- Text of the review comment.path
- The relative path to the file that necessitates a review comment.line
- The line of the blob in the pull request diff that the comment applies to.- Returns:
- the gh pull request review builder
-
create
Create gh pull request review.- Returns:
- the gh pull request review
- Throws:
IOException
- the io exception
-