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
1 answer

How can I remove the "
" tags in Hubot httpd script?

By default, hubot httpd.coffee script puts a pre tag in the output. Is there anyway to remove it? I'm trying to make hubot generate some basic html pages. spawn = require('child_process').spawn Fs = require 'fs' module.exports = (robot) -> …
0
votes
1 answer

Setting up the same repository twice under different names in janky

I have a build server which leverages janky as the glue between jenkins and hubot. I was wondering if anyone knows of a clean way in janky to duplicate a specific repository under a different name? The main problem that I'm trying to solve is that…
darkcharl
  • 58
  • 6
0
votes
1 answer

Hubot installation error where --create does not create a directory

I'm trying to heroku-deploy a hubot application (into Slack, if that matters). I'm developing locally on Ubuntu 14.04. I am closely following these instructions. Here are my steps... sudo apt-get install node npm sudo npm install -g hubot…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
0
votes
1 answer

Hubot only showing images for one user

I have setup Hubot for our company. It's working correctly, connecting to group chats, responding to its name, etc. The only issue is it won't show images, it just shows the link (which goes to the proper image). Protocol: XMPP Encryption: SSL/TSL…
cha55son
  • 423
  • 3
  • 12
0
votes
1 answer

Hubot And Django Development Server

I am trying to make a get request using coffeeScript, but it is not even making a request to my URL: module.exports = (robot) -> robot.respond /foo (.*) bar (.*) foobar (.*) /i, (msg) -> foo = msg.match[1] bar = msg.match[2] foobar =…
user3218088
  • 253
  • 3
  • 10
0
votes
2 answers

How to make Hubot on IRC print external script output as it is received instead of all at once?

I have a Hubot instance running on an IRC. Inside my scripts directory, I have several coffeescripts linking to external python scripts. My issue is that I have data that should print out before other data within the external scripts such as…
Ryan Peters
  • 115
  • 1
  • 11
0
votes
5 answers

Unable to parse json in node app

I have the following request body which i need to parse to json. I need to parse a payload field (which is a json with a lot of trash in it) to the proper JSON object (it's a result of console.log(req)): { payload: '{\\n \\"taskDueDate\\": \\"No…
mbajur
  • 4,406
  • 5
  • 49
  • 79
0
votes
1 answer

How can I get the timestamp of a XMPP chat message that's sent to Hubot?

I'm using an Openfire server to support Jabber chat between Spark clients. I want to use GitHub's Hubot to monitor chatrooms and listen for users to send messages to Hubot, then log the messages. I'm having a hard time figuring out how I can get the…
Bryan
  • 2,205
  • 1
  • 23
  • 43
0
votes
1 answer

Strange behavior in my Hubot adapter in coffeescript on nodejs

I'm working on a Hubot adapter for my corporate chat system. The output of the following code is quite surprising, I'm not sure where to go next. There is no runtime error (as far as I can tell) Output: connect console DEBUG connect logger posted…
James L
  • 16,456
  • 10
  • 53
  • 70
0
votes
0 answers

Setting up hubot on an openfire server

I'm running Ubuntu and I am trying to get a hubot to connect to my local openfire server. I followed the tutorial here, and everything went pretty smooth till toward the end, after editing the dependencies, I run npm install and receive two…
Jake Sellers
  • 2,350
  • 2
  • 21
  • 40
0
votes
1 answer

Testing Hubot locally in Ubuntu

Hi Stackoverflow community, Well the thing is that I'm working on a script for hubot. Before starting to code I'm trying to test some hubot commands in the command line (I already did it in Windows but for some reasons I've to change to Ubuntu…
Alexis Duran
  • 620
  • 14
  • 28
0
votes
1 answer

Function within a loop

I'm trying to write a script for hubot to get player statistics for a game, however I am having some trouble with list comprehension. Here's my code listings = [] listings = (for player in players request…
Jammie
  • 13
  • 4
0
votes
1 answer

Hubot with hipchat adapter not starting on ubuntu

I'm not very well versed in nodejs, but I'm trying to install hubot and run it with the hipchat adapter but, I'm getting the following error, package.json below. I've followed this tutorial,…
mackwerk
  • 1,689
  • 4
  • 21
  • 44
0
votes
1 answer

Is it possible to block the parent thread in Node JS?

I am attempting to fix up some third party NodeJS (hubot-scripts if anyone cares). The idea here is that we reach out to the Teamcity REST API once for every build returned from a previous call and iterate over them, printing a…
Abraham P
  • 15,029
  • 13
  • 58
  • 126
0
votes
1 answer

Jenkins Executor Starvation on CloudBees

I have setup jobs correctly using Jenkins on Cloudbees, Janky, and Hubot. Hubot and Janky work and are pushing the jobs to the Jenkins server. The job has been sitting in the Jenkins queue for over an hour now. I don't see anywhere to configure the…
Brett Hardin
  • 4,012
  • 2
  • 19
  • 22
1 2 3
18
19