All Implemented Interfaces:
HttpRequestInterface, JSONHelper

public class GHMilestone extends ClassBase
This class represents a GitHub milestone. It provides methods for fetching data about the milestone such as its number, title, due date, state, creator, open issues, closed issues, labels URL, and description.
  • Constructor Details

    • GHMilestone

      public GHMilestone(Github github, org.json.JSONObject jsonObject)
      Constructs a new GHMilestone instance with the provided JSON object.
      Parameters:
      jsonObject - the JSON object containing the milestone data
  • 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.
    • getDescription

      public String getDescription()
      Returns the description of the milestone.
      Returns:
      the description of the milestone
    • getUpdatedAt

      public OffsetDateTime getUpdatedAt()
      Returns the date and time when the milestone was last updated.
      Returns:
      the date and time when the milestone was last updated
    • getLabelsUrl

      public String getLabelsUrl()
      Returns the URL of the milestone labels.
      Returns:
      the URL of the milestone labels
    • getTitle

      public String getTitle()
      Returns the title of the milestone.
      Returns:
      the title of the milestone
    • getCreatedAt

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

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

      public int getNumber()
      Returns the number of the milestone.
      Returns:
      the number of the milestone
    • getState

      public GHState getState()
      Returns the state of the milestone.
      Returns:
      the state of the milestone
    • getCreator

      public GHUser getCreator()
      Returns the user who created the milestone.
      Returns:
      the user who created the milestone
    • getClosedIssues

      public int getClosedIssues()
      Returns the number of closed issues in the milestone.
      Returns:
      the number of closed issues in the milestone
    • getOpenIssues

      public int getOpenIssues()
      Returns the number of open issues in the milestone.
      Returns:
      the number of open issues in the milestone
    • getDueOn

      public String getDueOn()
      Returns the due date of the milestone.
      Returns:
      the due date of the milestone