Class GHIssue
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.bases.ClassBase
io.github.coho04.githubapi.entities.repositories.GHIssue
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
Represents a GitHub issue.
This class is a part of the GitHub API library.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the issue.Returns the reason for the issue being locked.Returns the user assigned to the issue.Returns the users assigned to the issue.Returns the author association of the issue.getBody()
Returns the body of the issue.Returns the date and time when the issue was closed.int
Returns the number of comments on the issue.Returns the URL of the issue comments.Returns the date and time when the issue was created.Returns the labels of the issue.Returns the URL of the issue labels.Returns the milestone of the issue.int
Returns the issue number.Returns the app via which the issue was performed.Returns the URL of the repository where the issue is located.getState()
Returns the state of the issue.Returns the reason for the state of the issue.Returns the URL of the issue timeline.getTitle()
Returns the title of the issue.Returns the date and time when the issue was last updated.getUser()
Returns the user who created the issue.boolean
isDraft()
Returns whether the issue is a draft.boolean
isLocked()
Returns whether the issue is locked.org.json.JSONObject
Converts this ClassBase object to a JSONObject.Methods inherited from class io.github.coho04.githubapi.bases.ClassBase
getEventsUrl, getHtmlUrl, getId, getNodeId, getUrl
Methods inherited from class io.github.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequest
Methods inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Constructor Details
-
GHIssue
Constructs a GHIssue object from a JSONObject.- Parameters:
jsonObject
- JSONObject representing a GitHub issue.
-
-
Method Details
-
toJSONObject
public org.json.JSONObject toJSONObject()Description copied from class:ClassBase
Converts this ClassBase object to a JSONObject.- Overrides:
toJSONObject
in classClassBase
- Returns:
- a JSONObject representation of this ClassBase object.
-
close
public void close()Closes the issue. -
getNumber
public int getNumber()Returns the issue number.- Returns:
- the issue number
-
getComments
public int getComments()Returns the number of comments on the issue.- Returns:
- the number of comments
-
getActiveLockReason
Returns the reason for the issue being locked.- Returns:
- the reason for the issue being locked
-
getAuthorAssociation
Returns the author association of the issue.- Returns:
- the author association
-
getBody
Returns the body of the issue.- Returns:
- the body of the issue
-
getClosedAt
Returns the date and time when the issue was closed.- Returns:
- the date and time when the issue was closed
-
getCommentsUrl
Returns the URL of the issue comments.- Returns:
- the URL of the issue comments
-
getCreatedAt
Returns the date and time when the issue was created.- Returns:
- the date and time when the issue was created
-
getLabelsUrl
Returns the URL of the issue labels.- Returns:
- the URL of the issue labels
-
getMilestone
Returns the milestone of the issue.- Returns:
- the milestone of the issue
-
getPerformedViaGithubApp
Returns the app via which the issue was performed.- Returns:
- the app via which the issue was performed
-
getRepositoryUrl
Returns the URL of the repository where the issue is located.- Returns:
- the URL of the repository where the issue is located
-
getState
Returns the state of the issue.- Returns:
- the state of the issue
-
getStateReason
Returns the reason for the state of the issue.- Returns:
- the reason for the state of the issue
-
getTimelineUrl
Returns the URL of the issue timeline.- Returns:
- the URL of the issue timeline
-
getTitle
Returns the title of the issue.- Returns:
- the title of the issue
-
getUpdatedAt
Returns the date and time when the issue was last updated.- Returns:
- the date and time when the issue was last updated
-
isDraft
public boolean isDraft()Returns whether the issue is a draft.- Returns:
- true if the issue is a draft, false otherwise
-
isLocked
public boolean isLocked()Returns whether the issue is locked.- Returns:
- true if the issue is locked, false otherwise
-
getUser
Returns the user who created the issue.- Returns:
- the user who created the issue
-
getAssignee
Returns the user assigned to the issue.- Returns:
- the user assigned to the issue
-
getLabels
Returns the labels of the issue.- Returns:
- the labels of the issue
-
getAssignees
Returns the users assigned to the issue.- Returns:
- the users assigned to the issue
-