@Immutable public interface Comment extends Comparable<Comment>, JsonReadable, JsonPatchableGithub issue comment.
JsonReadable, that's how you can get its full details in JSON format. For example, to get its author's Github login you get the entire JSON and then gets its element:
String login = comment.json() .getJsonObject("user") .getString("login");
However, it's better to use a supplementary "smart" decorator, which automates most of these operations:
String login = new Comment.Smart(comment).author().login();
- $Id: aba3655ac08357e80033ec3eaa98ac7a6761a151 $
- Yegor Bugayenko (firstname.lastname@example.org), Paulo Lobo (email@example.com)
- See Also:
- Issue Comments API
- Suppressed Checkstyle violations:
- MultipleStringLiterals (500 lines)
Nested Class Summary
Nested Classes Modifier and Type Interface Description
Comment.SmartSmart comment with additional features.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
issue()The issue it's in.
react(Reaction reaction)Adds the reaction to the comment.
reactions()List the reactions of the comment.
remove()Delete the comment.
Issue issue()The issue it's in.
- Owner of the comment
- Comment number
void remove() throws IOExceptionDelete the comment.
void react(Reaction reaction) throws IOExceptionAdds the reaction to the comment.
reaction- Reaction to be added.
IOException- In case something goes wrong.