Skip to content

Commit

Permalink
[Fixes #3] Check for null descriptions in github issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Chew committed Jun 7, 2020
1 parent 45ab163 commit 9960afe
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -52,10 +52,12 @@ protected void execute(CommandEvent commandEvent) {
}
EmbedBuilder e = new EmbedBuilder();
e.setTitle(issue.getTitle());
if(issue.getBody().length() > 200) {
e.setDescription(issue.getBody().substring(0, 199) + "...");
} else {
e.setDescription(issue.getBody());
if(issue.getBody() != null) {
if (issue.getBody().length() > 200) {
e.setDescription(issue.getBody().substring(0, 199) + "...");
} else {
e.setDescription(issue.getBody());
}
}
boolean open = issue.getState() == GHIssueState.OPEN;
boolean merged = false;
Expand Down

0 comments on commit 9960afe

Please sign in to comment.