org.kohsuke.github
Class GHCommitComment

java.lang.Object
  extended by org.kohsuke.github.GHCommitComment

public class GHCommitComment
extends Object

A comment attached to a commit (or a specific line in a specific file of a commit.)

Author:
Kohsuke Kawaguchi
See Also:
GHRepository.listCommitComments(), GHCommit.listComments(), GHCommit.createComment(String, String, Integer, Integer)

Constructor Summary
GHCommitComment()
           
 
Method Summary
 void delete()
          Deletes this comment.
 String getBody()
          Commit comment in the GitHub flavored markdown format.
 GHCommit getCommit()
          Gets the commit to which this comment is associated with.
 Date getCreatedAt()
           
 URL getHtmlUrl()
          URL like 'https://github.com/kohsuke/sandbox-ant/commit/8ae38db0ea5837313ab5f39d43a6f73de3bd9000#commitcomment-1252827' to show this commit comment in a browser.
 int getId()
           
 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.
 GHRepository getOwner()
           
 String getPath()
          A commit comment can be on a specific line of a specific file, if so, this field points to a file.
 String getSHA1()
           
 Date getUpdatedAt()
           
 GHUser getUser()
          Gets the user who put this comment.
 void update(String body)
          Updates the body of the commit message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GHCommitComment

public GHCommitComment()
Method Detail

getOwner

public GHRepository getOwner()

getCreatedAt

public Date getCreatedAt()

getUpdatedAt

public Date getUpdatedAt()

getHtmlUrl

public URL getHtmlUrl()
URL like 'https://github.com/kohsuke/sandbox-ant/commit/8ae38db0ea5837313ab5f39d43a6f73de3bd9000#commitcomment-1252827' to show this commit comment in a browser.


getSHA1

public String getSHA1()

getBody

public String getBody()
Commit comment in the GitHub flavored markdown format.


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.


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.


getId

public int getId()

getUser

public GHUser getUser()
               throws IOException
Gets the user who put this comment.

Throws:
IOException

getCommit

public GHCommit getCommit()
                   throws IOException
Gets the commit to which this comment is associated with.

Throws:
IOException

update

public void update(String body)
            throws IOException
Updates the body of the commit message.

Throws:
IOException

delete

public void delete()
            throws IOException
Deletes this comment.

Throws:
IOException


Copyright © 2012. All Rights Reserved.