Interface Issue

  • All Superinterfaces:
    Comparable<Issue>, JsonPatchable, JsonReadable
    All Known Implementing Classes:
    Issue.Smart, SfIssue

    @Immutable
    public interface Issue
    extends Comparable<Issue>, JsonReadable, JsonPatchable
    Github issue.

    Use a supplementary "smart" decorator to get other properties from an issue, for example:

     Issue.Smart issue = new Issue.Smart(origin);
     if (issue.isOpen()) {
       issue.close();
     }
    Since:
    0.1
    Version:
    $Id: ba8cb9827fa813e3e40b72511cc1bf93d9704245 $
    Author:
    Yegor Bugayenko (yegor256@gmail.com)
    See Also:
    Issues API
    To do:
    #1462:30min Implement lock reason validation. According to documentation lock reason must belong to a specific value domain. This validation must be performed in lock method and tests must be added to ensure that the class is accepting the correct values and rejecting the wrong ones.
    Suppressed Checkstyle violations:
    MultipleStringLiterals (500 lines)
    • Method Detail

      • repo

        Repo repo()
        Repository we're in.
        Returns:
        Repo
      • number

        int number()
        Get its number.
        Returns:
        Issue number
      • exists

        boolean exists()
                throws IOException
        Does this issue exist in Github?
        Returns:
        TRUE if this issue exists
        Throws:
        IOException - If there is any I/O problem
      • react

        void react​(Reaction reaction)
            throws IOException
        Adds the reaction to the issue.
        Parameters:
        reaction - Reaction to be added.
        Throws:
        IOException - If there is any I/O problem
      • reactions

        Iterable<Reaction> reactions()
        List the reactions of the issue.
        Returns:
        Issue reactions.
      • lock

        void lock​(String reason)
        Locks the issue.
        Parameters:
        reason - Lock reason
      • unlock

        void unlock()
        Unlocks the issue.
      • isLocked

        boolean isLocked()
        The issue conversation is locked?
        Returns:
        If the issue is locked.