Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[hangout.coffee] tighten up regex to only match hangout and not hangout2 etc #1282

Merged
merged 1 commit into from

2 participants

@aussielunix

I wanted to have 3 copies of this script that would each answer to hangout, hangout2 and hangout3.
Problem was the current regex is not specific enough and was matching on all three.

This change tightens up the regex match to be more specific to allow people to run multiple copies.

after this PR I can then copy node_modules/hubot-scripts/src/scripts/hangout.coffee to scripts/hangout2.coffee and scripts/hangout3.coffee and modify the ENV_VARS accordingly.

@technicalpickles

Maybe instead of copying the files around, could make modifications to this one to support multiple hangouts?

You might also be interested in https://github.com/hubot-scripts/hubot-google-hangouts

@technicalpickles technicalpickles merged commit e277f64 into github:master
@technicalpickles

We are actually moving away from adding scripts to repository in favor of separate npm packages per scripts. We have already stopped accepting new scripts, and will stop accepting pull requests on this repository after hubot 3.0.

See #1113 for details. If you are interested in maintaining this longer term, check npm in case someone already made a package for it, and if not, check out https://hubot.github.com/docs/scripting/ for creating a package of your own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/scripts/hangout.coffee
View
2  src/scripts/hangout.coffee
@@ -15,7 +15,7 @@
# nicoritschel
module.exports = (robot) ->
- robot.respond /hangout\s?(.*)?/i, (msg) ->
+ robot.respond /hangout\s.*/i, (msg) ->
if process.env.HUBOT_HANGOUT_URL
msg.send process.env.HUBOT_HANGOUT_URL
else
Something went wrong with that request. Please try again.