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.
Official Info: