Add JavaDocs

Do using IntelliJ JavaDocs plugin. Better to have something than nothing.
This commit is contained in:
Liam Newman
2019-11-14 13:24:28 -08:00
parent f6a01551fd
commit 757b9b2118
125 changed files with 7379 additions and 251 deletions

View File

@@ -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());