Class GHDiscussion

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

public class GHDiscussion extends GHObject
A discussion in GitHub Team.
Author:
Charles Moulliard
See Also:
  • Constructor Details

    • GHDiscussion

      public GHDiscussion()
  • Method Details

    • getHtmlUrl

      public URL getHtmlUrl() throws IOException
      Gets the html url.
      Specified by:
      getHtmlUrl in class GHObject
      Returns:
      the html url
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getTeam

      @Nonnull public GHTeam getTeam()
      Get the team to which this discussion belongs.
      Returns:
      the team for this discussion
    • getTitle

      public String getTitle()
      Get the title of the discussion.
      Returns:
      the title
    • getBody

      public String getBody()
      The description of this discussion.
      Returns:
      the body
    • getNumber

      public long getNumber()
      The number of this discussion.
      Returns:
      the number
    • getId

      public long getId()
      The id number of this discussion. GitHub discussions have "number" instead of "id". This is provided for convenience.
      Overrides:
      getId in class GHObject
      Returns:
      the id number for this discussion
      See Also:
    • isPrivate

      public boolean isPrivate()
      Whether the discussion is private to the team.
      Returns:
      true if discussion is private.
    • update

      Begins a batch update Consumer must call AbstractBuilder.done() to commit changes.
      Returns:
      a GHDiscussion.Updater
    • set

      Begins a single property update.
      Returns:
      a GHDiscussion.Setter
    • delete

      public void delete() throws IOException
      Delete the discussion.
      Throws:
      IOException - the io exception
    • equals

      public boolean equals(Object o)
      Equals.
      Overrides:
      equals in class Object
      Parameters:
      o - the o
      Returns:
      true, if successful
    • hashCode

      public int hashCode()
      Hash code.
      Overrides:
      hashCode in class Object
      Returns:
      the int
    • 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