Class GHPullRequestReviewCommentBuilder

java.lang.Object
org.kohsuke.github.GHPullRequestReviewCommentBuilder

public class GHPullRequestReviewCommentBuilder extends Object
Builds up a creation of new GHPullRequestReviewComment.
See Also:
  • Method Details

    • commitId

      public GHPullRequestReviewCommentBuilder 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 comment builder
    • body

      The text of the pull request review comment.
      Parameters:
      body - the body
      Returns:
      the gh pull request review comment builder
    • path

      The relative path to the file that necessitates a comment.
      Parameters:
      path - the path
      Returns:
      the gh pull request review comment builder
    • line

      public GHPullRequestReviewCommentBuilder line(int line)
      A single line of the blob in the pull request diff that the comment applies to.

      line(int) and lines(int, int) will overwrite each other's values.

      Parameters:
      line - the line number
      Returns:
      the gh pull request review comment builder
    • lines

      public GHPullRequestReviewCommentBuilder lines(int startLine, int endLine)
      The range of lines in the pull request diff that this comment applies to.

      line(int) and lines(int, int) will overwrite each other's values.

      Parameters:
      startLine - the start line number of the comment
      endLine - the end line number of the comment
      Returns:
      the gh pull request review comment builder
    • create

      public GHPullRequestReviewComment create() throws IOException
      Create gh pull request review comment.
      Returns:
      the gh pull request review comment builder
      Throws:
      IOException - the io exception