Class GHPullRequestReview.ReviewComment

java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHPullRequestReview.ReviewComment
Enclosing class:
GHPullRequestReview

public static class GHPullRequestReview.ReviewComment extends GHObject
Represents a review comment as returned by the review comments endpoint. This is a limited view that does not include line-related fields such as line, originalLine, side, etc.

To obtain the full GHPullRequestReviewComment with all fields, call readPullRequestReviewComment().

See Also:
  • Constructor Details

    • ReviewComment

      public ReviewComment()
      Create default ReviewComment instance
  • Method Details

    • getAuthorAssociation

      public GHCommentAuthorAssociation getAuthorAssociation()
      Gets the author association to the project.
      Returns:
      the author association to the project
    • getBody

      public String getBody()
      The comment itself.
      Returns:
      the body
    • getCommitId

      public String getCommitId()
      Gets commit id.
      Returns:
      the commit id
    • getDiffHunk

      public String getDiffHunk()
      Gets diff hunk.
      Returns:
      the diff hunk
    • getHtmlUrl

      public URL getHtmlUrl()
      Gets the html url.
      Returns:
      the html url
    • getOriginalCommitId

      public String getOriginalCommitId()
      Gets commit id.
      Returns:
      the original commit id
    • getOriginalPosition

      public int getOriginalPosition()
      Gets original position.
      Returns:
      the original position
    • getPath

      public String getPath()
      Gets path.
      Returns:
      the path
    • getPosition

      public int getPosition()
      Gets position.
      Returns:
      the position
    • getPullRequestReviewId

      public Long getPullRequestReviewId()
      Gets The ID of the pull request review to which the comment belongs.
      Returns:
      Long the ID of the pull request review
    • getPullRequestUrl

      public URL getPullRequestUrl()
      Gets URL for the pull request that the review comment belongs to.
      Returns:
      URL the URL of the pull request
    • getReactions

      public GHPullRequestReviewCommentReactions getReactions()
      Gets the Reaction Rollup.
      Returns:
      GHPullRequestReviewCommentReactions the reaction rollup
    • getUser

      public GHUser getUser() throws IOException
      Gets the user who posted this comment.
      Returns:
      the user
      Throws:
      IOException - the io exception
    • readPullRequestReviewComment

      public GHPullRequestReviewComment readPullRequestReviewComment() throws IOException
      Fetches the full GHPullRequestReviewComment from the API, which includes all fields such as line, originalLine, side, etc.
      Returns:
      the full GHPullRequestReviewComment
      Throws:
      IOException - if an I/O error occurs