Skip to content

Commit

Permalink
fix: email subject length
Browse files Browse the repository at this point in the history
  • Loading branch information
mvayngrib committed Jul 28, 2018
1 parent ca4d1a3 commit e442593
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/in-house-bot/log-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Promise from 'bluebird'
import json2yaml from 'json2yaml'
import map from 'lodash/map'
import pick from 'lodash/pick'
import truncate from 'lodash/truncate'
import isEmpty from 'lodash/isEmpty'
import Errors from '../errors'
import { StackUtils } from '../stack-utils'
Expand Down Expand Up @@ -542,7 +543,7 @@ export const generateAlertEmail = (alert: ParsedAlertEvent) => {
.map(e => e.msg)

const { stackName, accountId } = alert
const subject = `logging alert: ${stackName} (${accountId}): ${errorMsgs[0]}`
const subject = truncate(`logging alert: ${stackName} (${accountId}): ${errorMsgs[0]}`, { length: 100 })
let body = json2yaml.stringify(gist)
if (errorMsgs.length) {
body = `ERRORS: ${errorMsgs.join('\n')}
Expand Down

0 comments on commit e442593

Please sign in to comment.