Skip to content

Instantly share code, notes, and snippets.

@horie1024
Last active October 14, 2015 02:12
Show Gist options
  • Save horie1024/dbd350d43ade63053539 to your computer and use it in GitHub Desktop.
Save horie1024/dbd350d43ade63053539 to your computer and use it in GitHub Desktop.
aws = require 'aws-sdk'
module.exports = (robot) ->
robot.catchAll (msg) ->
matches = msg.message.text.match(/@vasilybot\s*(.*)/)
if matches == null or matches.length == 0
return
runArn = matches[1]
msg.send 'ok, start watching run.'
devicefarm = new aws.DeviceFarm({region: 'us-west-2'})
setInterval ->
devicefarm.getRun {arn: runArn}, (err, data) ->
console.log data
, 60000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment