<commit_before>import logger from 'winston'
import moment from 'moment'
import _ from 'lodash'

import * as contact from './contact'
import { config } from './config'
import { EventModel } from './model/events'
import { ContactGroupModel } from './model/contactGroups'
import { AlertModel } from './model/alerts'
import { UserModel } from './model/users'
import * as utils from './utils'
import * as Channels from './model/channels'

config.alerts = config.get('alerts')
const {ChannelModel} = Channels

const trxURL = trx => `${config.alerts.consoleURL}/#/transactions/${trx.transactionID}`

const statusTemplate = (transactions, channel, alert) =>
  ({
    plain () {
      return `\
OpenHIM Transactions Alert

The following transaction(s) have completed with status ${alert.status} on the OpenHIM instance running on ${config.alerts.himInstance}:
Channel - ${channel.name}
${(transactions.map(trx => trxURL(trx))).join('\n')}
\
`
    },
    html () {<commit_msg>Add a shebang character to the url of the transaction link (#987)<commit_after>import logger from 'winston'
import moment from 'moment'
import _ from 'lodash'

import * as contact from './contact'
import { config } from './config'
import { EventModel } from './model/events'
import { ContactGroupModel } from './model/contactGroups'
import { AlertModel } from './model/alerts'
import { UserModel } from './model/users'
import * as utils from './utils'
import * as Channels from './model/channels'

config.alerts = config.get('alerts')
const {ChannelModel} = Channels

const trxURL = trx => `${config.alerts.consoleURL}/#!/transactions/${trx.transactionID}`

const statusTemplate = (transactions, channel, alert) =>
  ({
    plain () {
      return `\
OpenHIM Transactions Alert

The following transaction(s) have completed with status ${alert.status} on the OpenHIM instance running on ${config.alerts.himInstance}:
Channel - ${channel.name}
${(transactions.map(trx => trxURL(trx))).join('\n')}
\
`
    },
    html () {
{'fraction_non_alphanumeric': 0.14609571788413098, 'fraction_numerical': 0.0015113350125944584, 'mean_word_length': 4.367567567567567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4460346', 'n_tokens_mistral': 602, 'n_tokens_neox': 596, 'n_words': 181}