Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

build Y U NO images

  • Loading branch information...
commit 6dc6586f3385f8318bfebb630067429c4b5f767c 1 parent b99f9b2
@alexdean alexdean authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 src/scripts/yuno.coffee
View
20 src/scripts/yuno.coffee
@@ -0,0 +1,20 @@
+# <name> y u no <action> - U NO WHAT IT DOES.
+# Get image generation script at https://github.com/alexdean/yuno
+
+module.exports = (robot) ->
+ robot.hear /(.*) y u no (.*)/i, (msg) ->
+ if not process.env.HUBOT_YUNO_URL?
+ msg.send "HUBOT_YUNO_URL is not set."
+ return
+
+ msg.http(process.env.HUBOT_YUNO_URL)
+ .query(
+ auth: process.env.HUBOT_YUNO_AUTH_TOKEN,
+ name: msg.match[1],
+ action: msg.match[2]
+ )
+ .get() (err, res, body) ->
+ if err
+ msg.send "error: #{err}"
+ return
+ msg.send body
Please sign in to comment.
Something went wrong with that request. Please try again.