github.com/justinjmoses/evergreen@v0.0.0-20170530173719-1d50e381ff0d/public/static/js/alerts.js (about)

     1  // We can add other implementations of alert 'classes' here.
     2  // Only email supported for the moment. See EVG-43 for flowdock support.
     3  
     4  function NewAlert(recipient){
     5    // JIRA alerts are denoted with "JIRA:project:issue type" format
     6    if (recipient.startsWith("JIRA:")) {
     7      var args = recipient.split(":")
     8      return {
     9        provider: "jira",
    10        settings: {
    11          project: args[1],
    12          issue: args[2],
    13        },
    14      }
    15    }
    16    // otherwise always default to email
    17    return {
    18      provider: "email",
    19      settings: {
    20        recipient: recipient,
    21      },
    22  
    23    }
    24  }
    25