diff --git a/src/config/config.js b/src/config/config.js index 90f0194..c07b1a1 100644 --- a/src/config/config.js +++ b/src/config/config.js @@ -31,6 +31,12 @@ const config = convict({ default: 'development', env: 'NODE_ENV' }, + environment: { + doc: 'The environment the application is running in', + format: String, + default: 'local', + env: 'ENVIRONMENT' + }, port: { doc: 'The port to bind.', format: 'port', diff --git a/src/listeners/github/handlers/workflow-run-notification-handler.js b/src/listeners/github/handlers/workflow-run-notification-handler.js index 7af487b..459a116 100644 --- a/src/listeners/github/handlers/workflow-run-notification-handler.js +++ b/src/listeners/github/handlers/workflow-run-notification-handler.js @@ -132,6 +132,7 @@ async function workflowRunNotificationHandler(server, event) { }) const topic = config.get('snsCdpNotificationArn') + const environment = config.get('environment') await sendSnsMessage({ snsClient: server.snsClient, topic, @@ -140,12 +141,11 @@ async function workflowRunNotificationHandler(server, event) { slack_channel: slackChannel, message }, - logger: server.logger + logger: server.logger, + environment }) } else { - server.logger.info( - `Notification handler: Not sending sns message - ${sendFailedActionNotification}` - ) + server.logger.info(`Notification handler: Not sending sns message`) } } }