Class GHCommitComment

    • Constructor Detail

      • GHCommitComment

        public GHCommitComment()
    • Method Detail

      • getOwner

        public GHRepository getOwner()
        Gets owner.
        Returns:
        the owner
      • getHtmlUrl

        public URL getHtmlUrl()
        URL like 'https://github.com/kohsuke/sandbox-ant/commit/8ae38db0ea5837313ab5f39d43a6f73de3bd9000#commitcomment-1252827' to show this commit comment in a browser.
        Specified by:
        getHtmlUrl in class GHObject
        Returns:
        the html url
      • getSHA1

        public String getSHA1()
        Gets sha 1.
        Returns:
        the sha 1
      • getBody

        public String getBody()
        Commit comment in the GitHub flavored markdown format.
        Returns:
        the body
      • getPath

        public String getPath()
        A commit comment can be on a specific line of a specific file, if so, this field points to a file. Otherwise null.
        Returns:
        the path
      • getLine

        public int getLine()
        A commit comment can be on a specific line of a specific file, if so, this field points to the line number in the file. Otherwise -1.
        Returns:
        the line
      • getUser

        public GHUser getUser()
                       throws IOException
        Gets the user who put this comment.
        Returns:
        the user
        Throws:
        IOException - the io exception
      • getCommit

        public GHCommit getCommit()
                           throws IOException
        Gets the commit to which this comment is associated with.
        Returns:
        the commit
        Throws:
        IOException - the io exception
      • update

        public void update​(String body)
                    throws IOException
        Updates the body of the commit message.
        Parameters:
        body - the body
        Throws:
        IOException - the io exception
      • delete

        public void delete()
                    throws IOException
        Deletes this comment.
        Throws:
        IOException - the io exception
      • getRoot

        @Deprecated
        public GitHub getRoot()
        Deprecated.
        For access to the GitHub instance, use a local copy instead of pulling it out of objects.
        Get the root GitHub instance for this object.
        Returns:
        the root GitHub instance