Class GHIssueComment

java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHIssueComment
All Implemented Interfaces:
Reactable
Direct Known Subclasses:
GHPullRequestReviewComment

public class GHIssueComment extends GHObject implements Reactable
Comment to the issue.
Author:
Kohsuke Kawaguchi
See Also:
  • Field Details

    • authorAssociation

      protected String authorAssociation
      The author's association with the repository.
    • body

      protected String body
      The comment body.
    • bodyHtml

      protected String bodyHtml
      The comment body in HTML format.
    • bodyText

      protected String bodyText
      The comment body in plain text format.
    • htmlUrl

      protected String htmlUrl
      The HTML URL of the comment.
    • user

      protected GHUser user
      The user who created the comment. Note: not fully populated, use getUser() for full details.
  • Constructor Details

    • GHIssueComment

      public GHIssueComment()
      Create default GHIssueComment instance
  • Method Details

    • createReaction

      public GHReaction createReaction(ReactionContent content) throws IOException
      Creates the reaction.
      Specified by:
      createReaction in interface Reactable
      Parameters:
      content - the content
      Returns:
      the GH reaction
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • delete

      public void delete() throws IOException
      Deletes this issue comment.
      Throws:
      IOException - the io exception
    • deleteReaction

      public void deleteReaction(GHReaction reaction) throws IOException
      Delete reaction.
      Specified by:
      deleteReaction in interface Reactable
      Parameters:
      reaction - the reaction
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getAuthorAssociation

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

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

      public String getBodyHtml()
      Gets the body in HTML format.
      Returns:
      the body in HTML format
    • getBodyText

      public String getBodyText()
      Gets the body in plain text format.
      Returns:
      the body in plain text format
    • getHtmlUrl

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

      public GHIssue getParent()
      Gets the issue to which this comment is associated.
      Returns:
      the parent
    • getUser

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

      public PagedIterable<GHReaction> listReactions()
      List reactions.
      Specified by:
      listReactions in interface Reactable
      Returns:
      the paged iterable
    • update

      public void update(String body) throws IOException
      Updates the body of the issue comment.
      Parameters:
      body - the body
      Throws:
      IOException - the io exception