Class GHPullRequestReviewBuilder

java.lang.Object
org.kohsuke.github.GHPullRequestReviewBuilder

public class GHPullRequestReviewBuilder extends Object
Builds up a creation of new GHPullRequestReview.
Author:
Kohsuke Kawaguchi
See Also:
  • Method Details

    • 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

      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