Additional methods for issue comment

This commit is contained in:
Kohsuke Kawaguchi
2018-01-21 11:50:22 -08:00
parent 192e21a9fc
commit 3503ff6d36
2 changed files with 43 additions and 5 deletions

View File

@@ -36,7 +36,7 @@ import static org.kohsuke.github.Previews.*;
public class GHIssueComment extends GHObject implements Reactable {
GHIssue owner;
private String body, gravatar_id;
private String body, gravatar_id, html_url, author_association;
private GHUser user; // not fully populated. beware.
/*package*/ GHIssueComment wrapUp(GHIssue owner) {
@@ -73,12 +73,13 @@ public class GHIssueComment extends GHObject implements Reactable {
return owner == null || owner.root.isOffline() ? user : owner.root.getUser(user.getLogin());
}
/**
* @deprecated This object has no HTML URL.
*/
@Override
public URL getHtmlUrl() {
return null;
return GitHub.parseURL(html_url);
}
public GHCommentAuthorAssociation getAuthorAssociation() {
return GHCommentAuthorAssociation.valueOf(author_association);
}
/**