Package org.kohsuke.github
Class GHLabel
java.lang.Object
org.kohsuke.github.GHLabel
The type GHLabel.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
AGHLabelBuilder
that updates a single property per requestdone()
is called automatically after the property is set.static class
AGHLabelBuilder
that allows multiple properties to be updated per request. -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Delete this label from the repository.boolean
Equals.getColor()
Color code without leading '#', such as 'f29513'.Purpose of Label.long
getId()
Gets id.getName()
Gets name.Gets node id.getRoot()
Deprecated.getUrl()
Gets url.int
hashCode()
Hash code.boolean
If the label is one of the default labels created by GitHub automatically.set()
Begins a single property update.void
void
setDescription
(String newDescription) update()
Begins a batch update Consumer must callAbstractBuilder.done()
to commit changes.
-
Method Details
-
getId
public long getId()Gets id.- Returns:
- the id
-
getNodeId
Gets node id.- Returns:
- the node id.
-
getUrl
Gets url.- Returns:
- the url
-
getName
Gets name.- Returns:
- the name
-
getColor
Color code without leading '#', such as 'f29513'.- Returns:
- the color
-
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
Sets color.- Parameters:
newColor
- 6-letter hex color code, like "f29513"- Throws:
IOException
- the io exception
-
setDescription
Sets description.- Parameters:
newDescription
- Description of label- Throws:
IOException
- the io exception
-
update
Begins a batch update Consumer must callAbstractBuilder.done()
to commit changes.- Returns:
- a
GHLabel.Updater
-
set
Begins a single property update.- Returns:
- a
GHLabel.Setter
-
delete
Delete this label from the repository.- Throws:
IOException
- the io exception
-
equals
Equals. -
hashCode
public int hashCode()Hash code. -
getRoot
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.Get the rootGitHub
instance for this object.- Returns:
- the root
GitHub
instance
-
GitHub
instance, use a local copy instead of pulling it out of objects.