Skip to content

Commit

Permalink
Simplify issue embed author assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
aikovdp committed Mar 23, 2024
1 parent 5752756 commit 5c0b7e3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class IssueCommand(
private fun createIssueEmbed(issue: GHIssue): MessageEmbed {
val open = issue.state == GHIssueState.OPEN
val author = issue.user
val authorName = if (author.name != null) author.name else author.login
val authorName = author.name ?: author.login
var issueBody = issue.body
.replace(Regex("(?s)<!--.*?-->"), "") // Removes HTML comments
.trim()
Expand Down

0 comments on commit 5c0b7e3

Please sign in to comment.