Skip to content

Instantly share code, notes, and snippets.

@AgentO3
Last active January 2, 2016 21:59
Show Gist options
  • Save AgentO3/8367324 to your computer and use it in GitHub Desktop.
Save AgentO3/8367324 to your computer and use it in GitHub Desktop.
Overview of the Hubot API

Key Points Behind ChatOps

  • Everyone sees all that happens
  • By placing tools in the middle of the conversation everyone is pairing all of the time
  • Teaching by doing
  • Communicate by doing
  • Accessibility
  • Empowering and democratizing
  • Turns Chat into a shared commandline
  • Newcomers learn by watching exprienced users
  • Help with onboarding process
  • Disseminates knowledge
  • Automate! Automate! Automate!
# Description:
# A simple overview of the Hubot API
#
# Configuration:
# None
#
# Commands:
# hubot command <optional> - This is a description of what this task does.
#
# Notes:
# None
#
# Author:
# o3Design
module.exports = (robot) ->
robot.respond /simple command/i, (msg) ->
msg.send "Wow that was easy!"
robot.respond /single parameter (.*)?/i, (msg) ->
msg.send "Just me my self and #{msg.match[1]}"
robot.respond /remind me to (.*) at (.*)?/i, (msg) ->
msg.send "Ok, I will remind you to #{msg.match[1]} at #{msg.match[2]}"
robot.respond /commands(.*)?/i, (msg) ->
msg.send OPSURL
robot.hear /doge me/i, (msg) ->
msg.http("http://dogeme.rowanmanning.com/random")
.get() (err, res, body) ->
msg.send JSON.parse(body).doge
// Description:
// A simple overview of the Hubot API
//
// Configuration:
// None
//
// Commands:
// hubot command <optional> - This is a description of what this task does.
//
// Notes:
// None
//
// Author:
// o3Design
module.exports = function (robot) {
robot.respond(/hello?/i, function (msg) {
msg.send("world");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment