Class Pull.Smart

    • Constructor Detail

      • Smart

        public Smart​(Pull pll)
        Public ctor.
        Parameters:
        pll - Pull request
    • Method Detail

      • isOpen

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

        public String state()
                     throws IOException
        Get its state.
        Returns:
        State of pull request
        Throws:
        IOException - If there is any I/O problem
      • state

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

        public String title()
                     throws IOException
        Get its title.
        Returns:
        Title of pull request
        Throws:
        IOException - If there is any I/O problem
      • title

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

        public String body()
                    throws IOException
        Get its body.
        Returns:
        Body of pull request
        Throws:
        IOException - If there is any I/O problem
      • body

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

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

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

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

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

        public Date closedAt()
                      throws IOException
        When this pull request was closed.
        Returns:
        Date of closing
        Throws:
        IOException - If there is any I/O problem
      • mergedAt

        public Date mergedAt()
                      throws IOException
        When this pull request was merged.
        Returns:
        Date of merging
        Throws:
        IOException - If there is any I/O problem
      • author

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

        public Issue issue()
        Get an issue where the pull request is submitted.
        Returns:
        Issue
      • commentsCount

        public int commentsCount()
                          throws IOException
        Get comments count.
        Returns:
        Count of comments
        Throws:
        IOException - If there is any I/O problem
        Since:
        0.8
      • repo

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

        public int number()
        Description copied from interface: Pull
        Get its number.
        Specified by:
        number in interface Pull
        Returns:
        Pull request number
      • merge

        public MergeState merge​(String msg,
                                String sha)
                         throws IOException
        Description copied from interface: Pull
        Merge it.
        Specified by:
        merge in interface Pull
        Parameters:
        msg - Commit message
        sha - Optional SHA hash for head comparison
        Returns:
        State of the Merge
        Throws:
        IOException - IOException If there is any I/O problem
      • 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
      • base

        public PullRef base()
                     throws IOException
        Description copied from interface: Pull
        Get its base ref.
        Specified by:
        base in interface Pull
        Returns:
        Base ref
        Throws:
        IOException - If there is any I/O problem
      • head

        public PullRef head()
                     throws IOException
        Description copied from interface: Pull
        Get its head ref.
        Specified by:
        head in interface Pull
        Returns:
        Head ref
        Throws:
        IOException - If there is any I/O problem