All Implemented Interfaces:
HttpRequestInterface, JSONHelper

public class GHIssue extends ClassBase
Represents a GitHub issue. This class is a part of the GitHub API library.
  • Constructor Details

    • GHIssue

      public GHIssue(Github github, org.json.JSONObject jsonObject)
      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 class ClassBase
      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

      public String getActiveLockReason()
      Returns the reason for the issue being locked.
      Returns:
      the reason for the issue being locked
    • getAuthorAssociation

      public String getAuthorAssociation()
      Returns the author association of the issue.
      Returns:
      the author association
    • getBody

      public String getBody()
      Returns the body of the issue.
      Returns:
      the body of the issue
    • getClosedAt

      public OffsetDateTime getClosedAt()
      Returns the date and time when the issue was closed.
      Returns:
      the date and time when the issue was closed
    • getCommentsUrl

      public String getCommentsUrl()
      Returns the URL of the issue comments.
      Returns:
      the URL of the issue comments
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      Returns the date and time when the issue was created.
      Returns:
      the date and time when the issue was created
    • getLabelsUrl

      public String getLabelsUrl()
      Returns the URL of the issue labels.
      Returns:
      the URL of the issue labels
    • getMilestone

      public GHMilestone getMilestone()
      Returns the milestone of the issue.
      Returns:
      the milestone of the issue
    • getPerformedViaGithubApp

      public String getPerformedViaGithubApp()
      Returns the app via which the issue was performed.
      Returns:
      the app via which the issue was performed
    • getRepositoryUrl

      public String getRepositoryUrl()
      Returns the URL of the repository where the issue is located.
      Returns:
      the URL of the repository where the issue is located
    • getState

      public GHState getState()
      Returns the state of the issue.
      Returns:
      the state of the issue
    • getStateReason

      public String getStateReason()
      Returns the reason for the state of the issue.
      Returns:
      the reason for the state of the issue
    • getTimelineUrl

      public String getTimelineUrl()
      Returns the URL of the issue timeline.
      Returns:
      the URL of the issue timeline
    • getTitle

      public String getTitle()
      Returns the title of the issue.
      Returns:
      the title of the issue
    • getUpdatedAt

      public OffsetDateTime 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

      public GHUser getUser()
      Returns the user who created the issue.
      Returns:
      the user who created the issue
    • getAssignee

      public GHUser getAssignee()
      Returns the user assigned to the issue.
      Returns:
      the user assigned to the issue
    • getLabels

      public List<GHLabel> getLabels()
      Returns the labels of the issue.
      Returns:
      the labels of the issue
    • getAssignees

      public List<GHUser> getAssignees()
      Returns the users assigned to the issue.
      Returns:
      the users assigned to the issue