Class Issue.Smart

    • Constructor Detail

      • Smart

        public Smart​(Issue iss)
        Public ctor.
        Parameters:
        iss - Issue
    • Method Detail

      • author

        public User author()
                    throws IOException
        Get its author.
        Returns:
        Author of issue (who submitted it)
        Throws:
        IOException - If there is any I/O problem
      • isOpen

        public boolean isOpen()
                       throws IOException
        Is it open?
        Returns:
        TRUE if it's open
        Throws:
        IOException - If there is any I/O problem
      • open

        public void open()
                  throws IOException
        Open it (make sure it's open).
        Throws:
        IOException - If there is any I/O problem
      • close

        public void close()
                   throws IOException
        Close it (make sure it's closed).
        Throws:
        IOException - If there is any I/O problem
      • state

        public void state​(String state)
                   throws IOException
        Change its state.
        Parameters:
        state - State of issue
        Throws:
        IOException - If there is any I/O problem
      • title

        public void title​(String text)
                   throws IOException
        Change its title.
        Parameters:
        text - Title of issue
        Throws:
        IOException - If there is any I/O problem
      • body

        public void body​(String text)
                  throws IOException
        Change its body.
        Parameters:
        text - Body of issue
        Throws:
        IOException - If there is any I/O problem
      • hasBody

        public boolean hasBody()
                        throws IOException
        Has body?
        Returns:
        TRUE if body exists
        Throws:
        IOException - If there is any I/O problem
        Since:
        0.22
      • hasAssignee

        public boolean hasAssignee()
                            throws IOException
        Has assignee?
        Returns:
        TRUE if assignee exists
        Throws:
        IOException - If there is any I/O problem
      • assignee

        public User assignee()
                      throws IOException
        Get its assignee.
        Returns:
        User Assignee of issue
        Throws:
        IOException - If there is any I/O problem
      • assign

        public void assign​(String login)
                    throws IOException
        Assign this issue to another user.
        Parameters:
        login - Login of the user to assign to
        Throws:
        IOException - If there is any I/O problem
      • url

        public URL url()
                throws IOException
        Get its URL.
        Returns:
        URL of issue
        Throws:
        IOException - If there is any I/O problem
      • htmlUrl

        public URL htmlUrl()
                    throws IOException
        Get its HTML URL.
        Returns:
        URL of issue
        Throws:
        IOException - If there is any I/O problem
      • createdAt

        public Date createdAt()
                       throws IOException
        When this issue was created.
        Returns:
        Date of creation
        Throws:
        IOException - If there is any I/O problem
      • closedAt

        public Date closedAt()
                      throws IOException
        When this issue was closed.
        Returns:
        Date of creation
        Throws:
        IOException - If there is any I/O problem
        Since:
        0.34
      • updatedAt

        public Date updatedAt()
                       throws IOException
        When this issue was updated.
        Returns:
        Date of update
        Throws:
        IOException - If there is any I/O problem
      • isPull

        public boolean isPull()
                       throws IOException
        Is it a pull request?
        Returns:
        TRUE if it is a pull request
        Throws:
        IOException - If there is any I/O problem
      • pull

        public Pull pull()
                  throws IOException
        Get pull request.
        Returns:
        Pull request
        Throws:
        IOException - If there is any I/O problem
      • latestEvent

        public Event latestEvent​(String type)
                          throws IOException
        Get the latest event of a given type. Throws IllegalStateException if the issue has no events of the given type.
        Parameters:
        type - Type of event
        Returns:
        Latest event of the given type
        Throws:
        IOException - If there is any I/O problem
      • roLabels

        public IssueLabels roLabels()
                             throws IOException
        Get read-only labels.
        Returns:
        Collection of labels
        Throws:
        IOException - If there is any I/O problem
        Since:
        0.6.2
      • hasMilestone

        public boolean hasMilestone()
                             throws IOException
        Does issue have milestone?
        Returns:
        True if has
        Throws:
        IOException - If fails
      • milestone

        public void milestone​(Milestone milestone)
                       throws IOException
        Add issueto milestone.
        Parameters:
        milestone - Milestone
        Throws:
        IOException - If fails
      • repo

        public Repo repo()
        Description copied from interface: Issue
        Repository we're in.
        Specified by:
        repo in interface Issue
        Returns:
        Repo
      • number

        public int number()
        Description copied from interface: Issue
        Get its number.
        Specified by:
        number in interface Issue
        Returns:
        Issue number
      • labels

        public IssueLabels labels()
        Description copied from interface: Issue
        Get all labels of the issue.
        Specified by:
        labels in interface Issue
        Returns:
        Labels
        See Also:
        Labels API
      • json

        public javax.json.JsonObject json()
                                   throws IOException
        Description copied from interface: JsonReadable
        Describe it in a JSON object.
        Specified by:
        json in interface JsonReadable
        Returns:
        JSON object
        Throws:
        IOException - If there is any I/O problem
      • patch

        public void patch​(javax.json.JsonObject json)
                   throws IOException
        Description copied from interface: JsonPatchable
        Patch using this JSON object.
        Specified by:
        patch in interface JsonPatchable
        Parameters:
        json - JSON object
        Throws:
        IOException - If there is any I/O problem
      • exists

        public boolean exists()
                       throws IOException
        Description copied from interface: Issue
        Does this issue exist in Github?
        Specified by:
        exists in interface Issue
        Returns:
        TRUE if this issue exists
        Throws:
        IOException - If there is any I/O problem
      • react

        public void react​(Reaction reaction)
        Description copied from interface: Issue
        Adds the reaction to the issue.
        Specified by:
        react in interface Issue
        Parameters:
        reaction - Reaction to be added.
      • reactions

        public Collection<Reaction> reactions()
        Description copied from interface: Issue
        List the reactions of the issue.
        Specified by:
        reactions in interface Issue
        Returns:
        Issue reactions.
      • lock

        public void lock​(String reason)
        Description copied from interface: Issue
        Locks the issue.
        Specified by:
        lock in interface Issue
        Parameters:
        reason - Lock reason
      • unlock

        public void unlock()
        Description copied from interface: Issue
        Unlocks the issue.
        Specified by:
        unlock in interface Issue
      • isLocked

        public boolean isLocked()
        Description copied from interface: Issue
        The issue conversation is locked?
        Specified by:
        isLocked in interface Issue
        Returns:
        If the issue is locked.