Upgrade to Pro — share decks privately, control downloads, hide ads and more …

hubotを使ったチャット環境

 hubotを使ったチャット環境

Yuji Takaesu

March 28, 2015
Tweet

More Decks by Yuji Takaesu

Other Decks in Technology

Transcript

  1. # Description: # Murashige san. # # Commands: # hubot

    murashige - Reply with Hi module.exports = (robot) -> robot.respond /村重$/i, (msg) -> if not robot.brain.data["murashige"] robot.brain.data["murashige"] = 0 robot.brain.data["murashige"]++ robot.brain.save() if robot.brain.data["murashige"] > 2 robot.brain.data["murashige"] = 0 msg.send "もうーーウザい!!" else msg.send "BAN!! BAN!! バンバン!!" robot.hear /バンバン$/i, (msg) -> msg.send "村重さーーーん” # Description: # Jenkins Tamagoのテスト実⾏行行 # # Configuration: # # Commands: # hubot tamago_all_spec # # Author # yusabana module.exports = (robot) -> robot.respond /jenkins_job (.*)/i, (msg) -> url = "" job = msg.match[1] msg.send "job: #{job}" msg.http("http:// 192.168.100.71:8080/job/#{job}/build") .get() (err, res, body) -> msg.send "Error: #{err}" msg.send "Response: #{res}" msg.send "Body: #{body}"