Skip to content

Commit

Permalink
fix(email): include markdown converter in email notification agent ca…
Browse files Browse the repository at this point in the history
…ll (#172)
  • Loading branch information
anotherchrisberry committed Sep 19, 2017
1 parent 414695a commit faea135
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package com.netflix.spinnaker.echo.notification

import com.netflix.spinnaker.echo.notification.NotificationTemplateEngine.HtmlToPlainTextFormatter
import com.netflix.spinnaker.echo.notification.NotificationTemplateEngine.MarkdownToHtmlFormatter
import groovy.util.logging.Slf4j
import com.netflix.spinnaker.echo.email.EmailNotificationService
import com.netflix.spinnaker.echo.model.Event
Expand Down Expand Up @@ -97,15 +99,17 @@ class EmailNotificationAgent extends AbstractEventNotificationAgent {
def body = FreeMarkerTemplateUtils.processTemplateIntoString(
template,
[
event : prettyPrint(toJson(event.content)),
url : spinnakerUrl,
application: event.details?.application,
executionId: event.content?.execution?.id,
type : type,
status : status,
link : link,
name : event.content?.execution?.name ?: event.content?.execution?.description,
message : customMessage
event : prettyPrint(toJson(event.content)),
url : spinnakerUrl,
htmlToText : new HtmlToPlainTextFormatter(),
markdownToHtml : new MarkdownToHtmlFormatter(),
application : event.details?.application,
executionId : event.content?.execution?.id,
type : type,
status : status,
link : link,
name : event.content?.execution?.name ?: event.content?.execution?.description,
message : customMessage
]
)

Expand Down

0 comments on commit faea135

Please sign in to comment.