Class GHRepositoryDiscussion

java.lang.Object
org.kohsuke.github.GHObject
org.kohsuke.github.GHRepositoryDiscussion

public class GHRepositoryDiscussion extends GHObject
A discussion in the repository.

This is different from Teams discussions (see GHDiscussion).

The discussion event exposes the GraphQL object (more or less - the ids are handled differently for instance) directly. The new Discussions API is only available through GraphQL so for now you cannot execute any actions on this object.

Author:
Guillaume Smet
See Also:
  • Constructor Details

    • GHRepositoryDiscussion

      public GHRepositoryDiscussion()
  • Method Details

    • getCategory

      public GHRepositoryDiscussion.Category getCategory()
      Gets the category.
      Returns:
      the category
    • getAnswerHtmlUrl

      public URL getAnswerHtmlUrl()
      Gets the answer html url.
      Returns:
      the answer html url
    • getAnswerChosenAt

      public Date getAnswerChosenAt()
      Gets the answer chosen at.
      Returns:
      the answer chosen at
    • getAnswerChosenBy

      public GHUser getAnswerChosenBy() throws IOException
      Gets the answer chosen by.
      Returns:
      the answer chosen by
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getHtmlUrl

      public URL getHtmlUrl()
      Gets the html url.
      Specified by:
      getHtmlUrl in class GHObject
      Returns:
      the html url
    • getNumber

      public int getNumber()
      Gets the number.
      Returns:
      the number
    • getTitle

      public String getTitle()
      Gets the title.
      Returns:
      the title
    • getUser

      public GHUser getUser() throws IOException
      Gets the user.
      Returns:
      the user
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getState

      public GHRepositoryDiscussion.State getState()
      Gets the state.
      Returns:
      the state
    • isLocked

      public boolean isLocked()
      Checks if is locked.
      Returns:
      true, if is locked
    • getComments

      public int getComments()
      Gets the comments.
      Returns:
      the comments
    • getAuthorAssociation

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

      public String getActiveLockReason()
      Gets the active lock reason.
      Returns:
      the active lock reason
    • getBody

      public String getBody()
      Gets the body.
      Returns:
      the body
    • getTimelineUrl

      public String getTimelineUrl()
      Gets the timeline url.
      Returns:
      the timeline url
    • getRoot

      @Deprecated public GitHub getRoot()
      Deprecated.
      For access to the GitHub instance, use a local copy instead of pulling it out of objects.
      Get the root GitHub instance for this object.
      Returns:
      the root GitHub instance