 #   ndaversa
 
 _ = require "underscore"
+moment = require "moment"
 
 Config = require "./config"
 Github = require "./github"

      @robot.hear Config.transitions.regex, (msg) =>
        msg.finish()
        [ __, key, toState ] = msg.match
        Jira.Transition.forTicketKeyToState key, toState, msg, yes

    #Clone
    @robot.hear Config.clone.regex, (msg) =>

    return false

  prepareResponseForJiraTickets: (msg) ->
    Promise.all(msg.match.map (key) =>
      return unless @shouldIncludeAttachmentForTicketKey key, msg
      _attachments = []
      Jira.Create.fromKey(key).then (ticket) ->
        _attachments.push ticket.toAttachment()
