Questions tagged [hubot]

Hubot is a an automation service / application. You can use hubot to provide access to resources through chat rooms, web services or other interfaces.

Hubot is a robot which runs using node.js and is written in coffee-script.

The documentation on the site does little justice to what Hubot can be used for, because it’s hard to explain that Hubot can be used for succinctly.

In short you can use Hubot to do anything that you are able to program.

See... terrible explanation.

Hubot can be configured to join your company chatroom and based on key words or regular expressions, Hubot can run commands, call APIs, execute scripts or programs… anything at all in the background and return the results to you in the chat room, without you having to change context.

I will give some examples of what Hubot can be used for to make understanding its value.

The two methods I will explain are: hear and respond . e.g.

robot.hear    /restart iis on "(.*)"/i, (msg) ->

robot.respond /restart iis on "(.*)"/i, (msg) ->

If you implement this as a respond function, you must address hubot directly in the chatroom.

john: hubot restart iis on myservername
bill: john just directly asked hubot to restart iis on myservername

However, if you were to implement this as a hear function. You could type a full sentence such as

john: I think if we restart iis on myservername it will resolve the issue.
bill: oops you just restarted the server

Hubot would automatically execute a restart of your iis server. In this case that would have been a bad thing.

With this basic premise that any task you can automate, can be implemented through hubot. You simply map a regular expression for hubot to watch for and either "hear" or "respond" to.

Here are a few ideas of how this could be of value:

  • Allow a person with no production access to execute specific tasks in production
  • Give developers are mechanism of requesting development environment refreshes from production in a chat room.
  • Since your interface to this functionality becomes your chatroom, you can use the chat room as audit documentation of who requested what task be completed.
  • Temporarily grant someone access to perform specific tasks by inviting them to special chat rooms, and removing them from the chatroom after the fact.

Here is a slide deck which discusses hubot/ chatops

ChatOps at GitHub by Jesse Newland

I hope this provides better insight into what hubot can do for you.

Find any repetitive task you do and give it a shot, see if you can write a hubot script to automate that task.

Check out sample scripts in the following deprecated repository for inspiration.

DEPRECATED HUBOT-SCRIPTS REPO

Official Info:

official hubot site

hubot source code

277 questions
0
votes
2 answers

Giant series of errors when deploying Hubot

I am installing hubot on Linux, and followed the instructions, receiving no errors. However, when I try to actually run my hubot, I encounter problems. First I tried daemonizing hubot according the the instructions at the very end of the linked…
beth
  • 1,916
  • 4
  • 23
  • 39
0
votes
1 answer

Persistently setting Hubot's Campfire variables on *nix

I have successfully set up a Hubot with variables set according to the Campfire adapter README, but when I restart my shell the variables are no longer set. How can I set these variables in a way that persists across shell sessions?
beth
  • 1,916
  • 4
  • 23
  • 39
0
votes
2 answers

Is there a way to merge two git branches without cloning?

I am trying to write a tool that will automatically merge code from one branch to other. It will be a command on hubot that will merge the appropriate branches. What I am looking for is a way to do this merge without cloning the code locally. Is…
Spartan
  • 547
  • 4
  • 12
-1
votes
1 answer

Calling hubot help from other command

I am trying to call hubot help for unknown commands for hubot. how can I call hubot help from another command like hubot test. Since I am using hubot help from external scripts file. I am not able to add robot.on inside it. How can I do this?
srth
  • 16
  • 4
-1
votes
2 answers

Hubot dosent Answer - Hubot Unix (Shell Adapter)

I've been having some problems to start using Hubot. I heard a lot about the tool and I was amused about all the things that I coud do with it. So my first step would install the hubot and see how it works and try to build some solutions. However…
-2
votes
1 answer

hubot-auth not authenticating

I have just installed hubot and I'm trying some basic tests. I have this basic script in /scripts: module.exports = (robot) -> robot.respond /myscript status/i, (msg) -> if robot.auth.hasRole(msg.envelope.user, 'test') …
schroeder
  • 533
  • 1
  • 7
  • 25
-3
votes
1 answer

Combine spawned process outputs

While the following code works great to call a python script and get the output: s = spawn 'python', ['-u', 'foo.py'] s.stdout.on 'data', (data) -> msg.send data.toString() s.stderr.on 'data', (data) -> msg.send data.toString() foo.py returns many…
schroeder
  • 533
  • 1
  • 7
  • 25
1 2 3
18
19