Skip to content

Notification module that notify code coverage on different channels

License

Notifications You must be signed in to change notification settings

gavignon/sfdc-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

version

Notify people on a channel (email or slack) after a deployment. This tool use the deploy result json file.

Getting Started

Works in Unix like system. Windows is not tested.

Installing

npm install -g sfdc-notify

Screenshots

  • Email template:

Usage

Command Line

$ sn -h

  Usage: sn [options]

  notify people on every channel after a deployment

  Options:

  -V, --version                      output the version number
  -c, --channel [channel]            channel of notification [slack/email]
  -f, --filepath [filepath]          path of the deploy result file
  -e, --email [email]                email or list of email to send to
  -uc, --usernameCI [usernameCI]     username that will post in slack
  -ec, --emailCI [emailCI]           sender email
  -u, --username [username]          email displayed user name
  -k, --sendgridKey [sendgridKey]    sendgrid api key
  -t, --templateId [templateId]      sendgrid template id
  -d, --details [details]            true to display all code coverage in slack
  -s, --slackWebhook [slackWebhook]  slack webhook URL
  -h, --help                         output usage information

Module

  var sn = require('sfdc-notify');

  sn({
      'channel': 'email',
      'filepath': 'path/to/deployResult.json',
      'email': ['[email protected]'],
      'usernameCI': 'Continuous Integration User',
      'emailCI': '[email protected]',
      'username': 'Firstname Lastname',
      'sendgridKey': 'Sengrid Api Key',
      'templateId': 'template id',
      'details': false
      }, console.log);

Built With

  • commander - The complete solution for node.js command-line interfaces, inspired by Ruby's commander.
  • @sendgrid/mail - This library allows you to quickly and easily use the SendGrid Web API v3 via Node.js.
  • slack-node - Slack Node SDK, full support for Webhook and the Slack API, continuously updated.

Versioning

SemVer is used for versioning.

Authors

License

This project is licensed under the MIT License - see the <LICENSE.md> file for details