module Janky
  module Notifier
    class ChatService
      def self.completed(build)
        status = build.green? ? "was successful" : "failed"
        color = build.green? ? "green" : "red"

        message = "Build #%s (%s) of %s/%s %s (%ss) %s" % [
          build.number,
          build.short_sha1,
          build.repo_name,
          build.branch_name,
          status,
          build.duration,
          build.web_url
        ]

        ::Janky::ChatService.speak(message, build.room_id, {:color => color, :build => build})
      end
    end
  end
end

module Janky
  module Notifier
    class ChatService
      def self.completed(build)
        status = build.green? ? "succeeded :thumbsup:" : "failed :collision::collision::collision::fire::fire::fire:"
        color = build.green? ? "green" : "red"

        message = "Build #%s of `%s/%s@%s` %s (took %ss). %s" % [
          build.number,
          build.repo_name,
          build.branch_name,
          build.short_sha1,
          status,
          build.duration,
          build.web_url
        ]

        ::Janky::ChatService.speak(message, build.room_id, {:color => color, :build => build})
      end
    end
  end
end

Make chat service notifier send better success and failure messages.
Make chat service notifier send better success and failure messages.
