mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 08:21:23 +00:00
Add JavaDocs
Do using IntelliJ JavaDocs plugin. Better to have something than nothing.
This commit is contained in:
@@ -32,8 +32,8 @@ import static org.kohsuke.github.Previews.*;
|
||||
* Comment to the issue
|
||||
*
|
||||
* @author Kohsuke Kawaguchi
|
||||
* @see GHIssue#comment(String)
|
||||
* @see GHIssue#listComments()
|
||||
* @see GHIssue#comment(String) GHIssue#comment(String)
|
||||
* @see GHIssue#listComments() GHIssue#listComments()
|
||||
*/
|
||||
public class GHIssueComment extends GHObject implements Reactable {
|
||||
GHIssue owner;
|
||||
@@ -48,6 +48,8 @@ public class GHIssueComment extends GHObject implements Reactable {
|
||||
|
||||
/**
|
||||
* Gets the issue to which this comment is associated.
|
||||
*
|
||||
* @return the parent
|
||||
*/
|
||||
public GHIssue getParent() {
|
||||
return owner;
|
||||
@@ -55,6 +57,8 @@ public class GHIssueComment extends GHObject implements Reactable {
|
||||
|
||||
/**
|
||||
* The comment itself.
|
||||
*
|
||||
* @return the body
|
||||
*/
|
||||
public String getBody() {
|
||||
return body;
|
||||
@@ -62,6 +66,8 @@ public class GHIssueComment extends GHObject implements Reactable {
|
||||
|
||||
/**
|
||||
* Gets the ID of the user who posted this comment.
|
||||
*
|
||||
* @return the user name
|
||||
*/
|
||||
@Deprecated
|
||||
public String getUserName() {
|
||||
@@ -70,6 +76,10 @@ public class GHIssueComment extends GHObject implements Reactable {
|
||||
|
||||
/**
|
||||
* Gets the user who posted this comment.
|
||||
*
|
||||
* @return the user
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*/
|
||||
public GHUser getUser() throws IOException {
|
||||
return owner == null || owner.root.isOffline() ? user : owner.root.getUser(user.getLogin());
|
||||
@@ -80,12 +90,22 @@ public class GHIssueComment extends GHObject implements Reactable {
|
||||
return GitHub.parseURL(html_url);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets author association.
|
||||
*
|
||||
* @return the author association
|
||||
*/
|
||||
public GHCommentAuthorAssociation getAuthorAssociation() {
|
||||
return GHCommentAuthorAssociation.valueOf(author_association);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the body of the issue comment.
|
||||
*
|
||||
* @param body
|
||||
* the body
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*/
|
||||
public void update(String body) throws IOException {
|
||||
new Requester(owner.root).with("body", body).method("PATCH").to(getApiRoute(), GHIssueComment.class);
|
||||
@@ -94,6 +114,9 @@ public class GHIssueComment extends GHObject implements Reactable {
|
||||
|
||||
/**
|
||||
* Deletes this issue comment.
|
||||
*
|
||||
* @throws IOException
|
||||
* the io exception
|
||||
*/
|
||||
public void delete() throws IOException {
|
||||
new Requester(owner.root).method("DELETE").to(getApiRoute());
|
||||
|
||||
Reference in New Issue
Block a user