Class GHLabel

java.lang.Object
org.kohsuke.github.GHLabel

public class GHLabel extends Object
The type GHLabel.
Author:
Kohsuke Kawaguchi
See Also:
  • Method Details

    • getId

      public long getId()
      Gets id.
      Returns:
      the id
    • getNodeId

      public String getNodeId()
      Gets node id.
      Returns:
      the node id.
    • getUrl

      @Nonnull public String getUrl()
      Gets url.
      Returns:
      the url
    • getName

      @Nonnull public String getName()
      Gets name.
      Returns:
      the name
    • getColor

      @Nonnull public String getColor()
      Color code without leading '#', such as 'f29513'.
      Returns:
      the color
    • getDescription

      @CheckForNull public String getDescription()
      Purpose of Label.
      Returns:
      the description
    • isDefault

      public boolean isDefault()
      If the label is one of the default labels created by GitHub automatically.
      Returns:
      true if the label is a default one
    • setColor

      @Deprecated public void setColor(String newColor) throws IOException
      Deprecated.
      use set() or update() instead
      Sets color.
      Parameters:
      newColor - 6-letter hex color code, like "f29513"
      Throws:
      IOException - the io exception
    • setDescription

      @Deprecated public void setDescription(String newDescription) throws IOException
      Deprecated.
      use set() or update() instead
      Sets description.
      Parameters:
      newDescription - Description of label
      Throws:
      IOException - the io exception
    • update

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

      @BetaApi public GHLabel.Setter set()
      Begins a single property update.
      Returns:
      a GHLabel.Setter
    • delete

      public void delete() throws IOException
      Delete this label from the repository.
      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