Skip to content

Loading…

Massive header docs update #468

Merged
merged 37 commits into from

4 participants

@tombell

Reformatting the header comment at the top of each script to simplify and provide useful information for configuring/dependencies.

Preferably refrain for merging in pull requests until this update is finished.

WIP.

@technicalpickles
GitHub member

I started apply this to hubot's src/scripts. After a few, having headings for things that were None seemed like noise. Except maybe description, which probably should be a real description.

Also, a few new headings I encountered needing:

  • URLs: for routing stuff
  • Examples: for examples of commands, when it's not obvious how to use
@tombell

I thought about leaving None so services like the hubot-scripts-catalog can easily parse it. When I've finished updating the rest, we can maybe work out what needs adding and what doesn't.

@technicalpickles
GitHub member

Template for copy-pasta into scripts:

# Description:
#   None
#
# Dependencies:
#   None
#
# Configuration:
#   None
#
# Commands:
#   None
#
# Author:
#   None

Also, this may be me being picky, but not a fan of the leading/trailing lines.

@tombell

Me either, I was gonna remove them.

@technicalpickles
GitHub member

I was thinking about Configuration, and it probably would be good to have notes about what they are. The aws.coffee had this, and so does wunderlist.coffee which I'm looking at now. I could imagine something like hubot help configuration listing out all these environment variables and what they are for. Those shouldn't show up for hubot help for commands though.

Having 'help commands' be any line with a - can be kind of annoying, especially if you have stuff legitimately hyphenated words. It also means that HUBOT_WUNDERLIST_SMTP_HOST - your smtp host e.g. smtp.gmail.com would match, even if it's not a command. For this case at least, I think we can update hubot to skip over lines that start with HUBOT_.

@tombell

Maybe update hubot to read and parse the header comments and store the relevant pieces of info for help stuff.

@tombell

Oof. Think that's me done for the night, you fancy finishing off the last few letters?

@technicalpickles
GitHub member

There's just s and t left. Of course, there's 47 between them... I'll see how far I can get on em.

@technicalpickles
GitHub member

Calling it night. Just 's' left now. Give a shout if/when you pick back up on these.

@stevenh512

Should this None be here? :grin:

GitHub member

None. I mean... Nope. If this is the only one I missed after updating all these comments, then I will be quite pleased.

Not 100% sure.. but I think this is the only one.

@tombell

I'll work on 's' today.

@tombell

I think we're done!

@sirkitree

Wow, great job guys! I just saw this and I'm pretty damn happy about it. :) Reviewing...

@sirkitree sirkitree commented on the diff
src/scripts/9gag.coffee
@@ -1,7 +1,18 @@
-# hubot 9gag me - Returns a random meme image.
-
-# Random meme from 9gag
-# Rewrite by Enrique Vidal
+# Description:
+# None

You could probably put the description here to be "Returns a random meme image", but not a huge deal I think.

@technicalpickles GitHub member

For scripts that are a single trigger, with the help command being enough to explain it, I almost think Description isn't really necessary. It's just copy-pasta, that doesn't add anything compared to the usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/abstract.coffee
((11 lines not shown))
-# Software is furnished to do so, subject to the following
-# conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
+# Description:
+# None

Again, here the description could be "Prints a nice abstract of the given topic"

@technicalpickles GitHub member

It's also a little fuzzy if we should be removing licensing stuff that people add to their scripts. Or, we have to assume they are being made under hubot-script's license, and remove it from all the scripts that have it.

@tombell
tombell added a note

When people usually contribute to an open source project the license is usually the one of the actual project. If the license differs to the hubot-scripts license, then people should release the script in it's own package in my opinion.

I have to agree with @tombell here.

It should probably be part of the submission guidelines or something. Are there any actually?

@technicalpickles GitHub member

Sounds good to me. There isn't a guideline, but there should be. The README is going to be the best place for that, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/achievement_unlocked.coffee
@@ -1,6 +1,18 @@
+# Description:
+# None

This could actually use a description, but should probably be a separate issue. i have no idea what the heck this does from reading the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/ackbar.coffee
@@ -1,7 +1,17 @@
-# It's a trap
+# Description:
+# None

Seems there are quite a lot of blank descriptions or the description is in the command. Perhaps a separate pull request once the formatting is at least in place would be warranted instead of pointing them all out here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/auto-stache.coffee
((4 lines not shown))
#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# None

Commands: None? Shouldn't this be required?

@technicalpickles GitHub member

Not strictly speaking. You can have scripts that are just doing routing stuff, for example. In this case, 'command' isn't really accurate. It's more the things it will hear and respond to, ie URLs with png, jpg, gif.

@tombell
tombell added a note

Here the description will suffice, commands imply something you type to trigger it, where as this just detects URLs.

Yeah, I think there are a few that listen for particular things. In this case an image. I wonder if cases here it's more of a listener than a command that we can list that, perhaps in notes? This one is probably explanatory enough within the description.

@tombell
tombell added a note

Might be a better option to rename Commands: to Triggers: which will cover everything. Thoughts?

++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/aws.coffee
((23 lines not shown))
#
-# package.json needs to have "aws2js":"0.6.12" and "moment":"1.6.2" and "underscore":"1.3.3"
+# Commands:
+# hubot sqs status - Returns the status of SQS queues

Think we're missing a command here. Looks like the original doc header had two commands.

# hubot sqs status - Returns the status of SQS queues.
# hubot ec2 status - Returns the status of EC2 instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/conversation.coffee
@@ -1,4 +1,17 @@
-# Extends robot adding conversation features
+# Description:
+# Extends robot adding conversation features
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# None

Another Commands: None
Perhaps this is another area for a separate issue? "Find all scripts not listing a command and document the command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/demolition-man.coffee
@@ -1,4 +1,16 @@
-# Watch your language!
+# Description:
+# Watch your language!
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/eval.coffee
@@ -1,6 +1,17 @@
-# evaluate code.
+# Description:
+# evaluate code

LOL - wow, this just sounds like a terrible idea - what the heck are the standards for allowing a script in? Whoa.

@tombell
tombell added a note

Eval's code on a web service, not the hubot, so there is no issue really.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/facepalm.coffee
@@ -1,5 +1,16 @@
-# Clearly illustrate with an image what people mean whenever
-# they say "facepalm".
+# Description:
+# Clearly illustrate with an image what people mean whenever they say "facepalm"
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/file-brain.coffee
@@ -1,8 +1,21 @@
+# Description:
+# None
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# FILE_BRAIN_PATH
+#
+# Commands:
+# None

Missing command and description docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/flying-high.coffee
@@ -1,3 +1,17 @@
+# Description:
+# None
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command and description docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on an outdated diff
src/scripts/github-issues.coffee
((4 lines not shown))
#
-# You need to set the following variable:
-# HUBOT_GITHUB_TOKEN = "<oauth token>"
+# Dependencies:
+# "underscore": "1.3.3"
+# "underscore": "2.1.1"

this relies on 2 versions of underscore? is that even possible?

@tombell
tombell added a note

the 2nd one is suppose to be underscore.string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/inigo-montoya.coffee
@@ -1,3 +1,17 @@
+# Description:
+# None
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command and description docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/itcrowd.coffee
((7 lines not shown))
-
-# REQUIRED MODULES
-# sudo npm install htmlparser
-# sudo npm install soupselect
-# sudo npm install jsdom
-# sudo npm install underscore
+# Dependencies:
+# "htmlparser": "1.7.6"
+# "soupselect: "0.2.0"
+# "jsdom": "0.2.14"
+# "underscore": "1.3.3"
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/jira.coffee
((10 lines not shown))
-# hubot show filter(s) - Show all filters
-# hubot show filter <name> - Show a specific filter
-
-# Required environment variables:
-# * HUBOT_JIRA_URL: Base URL to JIRA instance, without trailing slash eg: https://myserver.com/jira
-# * HUBOT_JIRA_USER: JIRA username
-# * HUBOT_JIRA_PASSWORD: JIRA password
-# Optional environment variables:
-# * HUBOT_JIRA_USE_V2: "true" to use v2 of the JIRA REST API, defaults to "false" (v1)
-# * HUBOT_JIRA_MAXLIST: maximum number of items to show for a JQL query, defaults to 10
-# * HUBOT_JIRA_ISSUEDELAY: number of seconds to not show a ticket for again after it's been
-# mentioned once. This helps to cut down on noise from the bot.
-# Defaults to 30.
-# * HUBOT_JIRA_IGNOREUSERS: Comma-seperated list of users to ignore "hearing" issues from.
-# This works well with other bots or API calls that post to the room.
-# Example: "Subversion,TeamCity,John Doe"

There are quite a few of these where the description for keys is removed. IMHO it might be good to keep these somehow. Either as they are (with the config vars) or in the Notes section.

@tombell
tombell added a note

Not 100% certain on what the formatting of the help for keys is going to be like, they can be retrofitted once formatting is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/jordan.coffee
@@ -1,5 +1,17 @@
-# Display a picture of Michael Jordan if anyone invokes "jordan" or says "23"
-# Cause Jordan is God. So much more than Steve Jobs :D
+# Description:
+# Display a picture of Michael Jordan if anyone invokes "jordan" or says "23"
+# Cause Jordan is God. So much more than Steve Jobs :D
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Description says it all, so command doc being blank here might be ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/likeaboss.coffee
((4 lines not shown))
#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/linsanity.coffee
@@ -1,5 +1,17 @@
-# Display a picture of Jeremy Lin if anyone invokes "linsanity" or says "linspire"
-# Cause Lin is Linspiring!
+# Description:
+# Display a picture of Jeremy Lin if anyone invokes "linsanity" or
+# says "linspire". Cause Lin is Linspiring!
+#
+# Dependecies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Command blank here too, but description says it's more of a listener.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@tombell

The commands are basically me not bothering to read a script and work out what everything does, I only added the commands for scripts that already had them documented.

@sirkitree sirkitree commented on the diff
src/scripts/myappstatus.coffee
((14 lines not shown))
# setup http://hostname/hubot/myappstatus/ROOMNUMBER as
# your notification webook. If on Heroku lookup the hostname where
# the hubot server is running. (e.g. my-hubot.herokuapp.com)
#
-# Check you are using a recent version of hubot in packages.json
-# to ensure the robot.router is available
+# Commands:

Missing commands doc and nothing says anything about what it keys off of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/ping.coffee
@@ -1,4 +1,16 @@
-# Hubot is very attentive (ping hubot)
+# Description:
+# Hubot is very attentive (ping hubot)
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command docs. Is 'ping hubot' the command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/polite.coffee
((4 lines not shown))
#
-# Say thanks to your robot.
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/put-it-back.coffee
@@ -1,4 +1,16 @@
-# put back the table
+# Description:
+# put back the table
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+#

Missing command docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/redis-brain.coffee
@@ -1,3 +1,18 @@
+# Description:
+# None
+#
+# Dependencies:
+# "redis": "0.7.2"
+#
+# Configuration:
+# REDISTOGO_URL
+#
+# Commands:
+# None

Missing command and description docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/sensitive.coffee
@@ -1,4 +1,16 @@
-# Hubot has feelings too, you know
+# Description:
+# Hubot has feelings too, you know
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command docs and desc gives you no clue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/serenity.coffee
@@ -1,4 +1,16 @@
-# Serenity Now!!
+# Description:
+# Serenity Now!!
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command docs and desc gives you no clue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/sigh.coffee
@@ -1,4 +1,16 @@
-# http://xkcd.com/1009/
+# Description:
+# http://xkcd.com/1009/
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command docs and desc gives you no clue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/store-messages-couchdb.coffee
@@ -1,3 +1,18 @@
+# Description:
+# None
+#
+# Dependencies:
+# "cradle": "0.6.3"
+#
+# Configuration:
+# HUBOT_COUCHDB_URL
+#
+# Commands:
+# None

Missing command docs and desc gives you no clue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/sweetdude.coffee
@@ -1,3 +1,17 @@
+# Description:
+# None
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+#

Missing command docs and desc gives you no clue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/tweet-content.coffee
@@ -1,4 +1,17 @@
-# detect tweet URL and send tweet content
+# Description:
+# None
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:

Missing command docs and description (mistakenly?) removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on an outdated diff
src/scripts/wikipedia.coffee
((13 lines not shown))
+# copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following
+# conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.

Should this really be in here? Shouldn't any script to be included be part of the overall and only one determined license?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@sirkitree sirkitree commented on the diff
src/scripts/xmas.js
((9 lines not shown))
//
+// Configuration:
+// None
+//
+// Commands:
+// hubot is it xmas ? - returns whether is it christmas or not
+// hubot is it christmas ? - returns whether is it christmas or not
+//
+// Author:
+// Johnny G. Halife

Why does this one have different comment notation?

@tombell
tombell added a note

It's JavaScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@tombell
# Description:
#   <description of the script functionality>
#
# Dependencies:
#   "<module-name>": "<module-version>"
#
# Configuration:
#   ENV_VAR_1: <what the environment variable is>
#
# Triggers:
#   <respond/hear trigger> - <description of the functionality for the trigger>
#
# Notes:
#   <optional notes about the script, including finding values for environment variables and setup>
#
# Routes:
#   <GET/PUT/POST/DELETE route> - <description of what the route does>
#
# Author:
#   <author's github username>
@tombell

I'm going to give this another once through changing Commands: to Triggers:, then I'm going to merge into master. Anything people disagree with then can be opened in separate issues/pull requests.

@tombell tombell merged commit 9b6ec36 into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 8, 2012
  1. @tombell
  2. @tombell

    Missing dependency version

    tombell committed
  3. @tombell
  4. @tombell

    Missing dependencies

    tombell committed
  5. @tombell
  6. @tombell
  7. @tombell
Commits on Jun 9, 2012
  1. @tombell
  2. @tombell
  3. @technicalpickles
  4. @technicalpickles
  5. @tombell
  6. @tombell
  7. @tombell
  8. @tombell
  9. @tombell
  10. @tombell
  11. @tombell
  12. @tombell
  13. @tombell
  14. @tombell
  15. @tombell
  16. @technicalpickles
  17. @technicalpickles
  18. @tombell
  19. @tombell
  20. @technicalpickles
  21. @technicalpickles
  22. @technicalpickles
  23. @tombell
  24. @tombell
  25. @tombell
  26. @tombell
Commits on Jun 10, 2012
  1. @tombell

    Remove non-standard doc comments

    tombell committed
  2. @tombell

    Fix misc issues

    tombell committed
Commits on Jun 12, 2012
  1. @tombell

    Minor README update

    tombell committed
Commits on Jun 24, 2012
  1. @tombell
This page is out of date. Refresh to see the latest.
Showing with 3,840 additions and 1,328 deletions.
  1. +56 −16 README.md
  2. +15 −5 src/scripts/46elks.coffee
  3. +15 −4 src/scripts/9gag.coffee
  4. +14 −24 src/scripts/abstract.coffee
  5. +13 −1 src/scripts/achievement_unlocked.coffee
  6. +12 −2 src/scripts/ackbar.coffee
  7. +13 −5 src/scripts/adult.coffee
  8. +15 −15 src/scripts/airbrake.coffee
  9. +13 −2 src/scripts/alot.coffee
  10. +13 −2 src/scripts/ambush.coffee
  11. +14 −2 src/scripts/animal.coffee
  12. +13 −12 src/scripts/archer.coffee
  13. +14 −8 src/scripts/asana.coffee
  14. +13 −2 src/scripts/ascii.coffee
  15. +17 −13 src/scripts/auth.coffee
  16. +13 −1 src/scripts/auto-stache.coffee
  17. +23 −16 src/scripts/aws.coffee
  18. +12 −3 src/scripts/aww.coffee
  19. +14 −4 src/scripts/b6n.coffee
  20. +15 −1 src/scripts/bang-bang.coffee
  21. +15 −6 src/scripts/bang.coffee
  22. +13 −4 src/scripts/base36.coffee
  23. +13 −5 src/scripts/base58.coffee
  24. +13 −2 src/scripts/base64.coffee
  25. +13 −7 src/scripts/basecamp.coffee
  26. +18 −12 src/scripts/beanstalk.coffee
  27. +13 −2 src/scripts/bees.coffee
  28. +12 −1 src/scripts/bij.coffee
  29. +13 −7 src/scripts/bing-images.coffee
  30. +13 −3 src/scripts/bing.coffee
  31. +12 −4 src/scripts/bitbucket.coffee
  32. +19 −12 src/scripts/bookmark.coffee
  33. +13 −2 src/scripts/botsnack.coffee
  34. +16 −6 src/scripts/brewerydb.coffee
  35. +15 −3 src/scripts/buscemi.coffee
  36. +12 −2 src/scripts/carlton.coffee
  37. +18 −3 src/scripts/cat.coffee
  38. +14 −2 src/scripts/celery-man.coffee
  39. +12 −3 src/scripts/chat.coffee
  40. +14 −2 src/scripts/cheer.coffee
  41. +15 −1 src/scripts/cheerlights.coffee
  42. +14 −2 src/scripts/chm.coffee
  43. +13 −5 src/scripts/chuck-norris.coffee
  44. +14 −1 src/scripts/clark.coffee
  45. +15 −3 src/scripts/clojure.coffee
  46. +13 −2 src/scripts/cloudapp.coffee
  47. +14 −3 src/scripts/coderwall.coffee
  48. +12 −2 src/scripts/coin.coffee
  49. +13 −2 src/scripts/commitmessage.coffee
  50. +13 −3 src/scripts/complete.coffee
  51. +14 −2 src/scripts/conversation.coffee
  52. +14 −3 src/scripts/corgime.coffee
  53. +13 −2 src/scripts/cowsay.coffee
  54. +14 −4 src/scripts/cricket.coffee
  55. +14 −3 src/scripts/days_since.coffee
  56. +15 −8 src/scripts/deadline.coffee
  57. +11 −2 src/scripts/dealwithit.coffee
  58. +10 −5 src/scripts/decide.coffee
  59. +15 −1 src/scripts/defprogramming.coffee
  60. +13 −1 src/scripts/demolition-man.coffee
  61. +14 −3 src/scripts/destiny.coffee
  62. +14 −2 src/scripts/dialectizer.coffee
  63. +13 −3 src/scripts/dice.coffee
  64. +13 −2 src/scripts/dilbert.coffee
  65. +13 −2 src/scripts/directions.coffee
  66. +14 −1 src/scripts/disassemble.coffee
  67. +14 −4 src/scripts/dnsimple.coffee
  68. +13 −1 src/scripts/do-it-live.coffee
  69. +15 −3 src/scripts/dribbble.coffee
  70. +12 −4 src/scripts/eight-ball.coffee
  71. +13 −2 src/scripts/eval.coffee
  72. +13 −2 src/scripts/facepalm.coffee
  73. +16 −5 src/scripts/faceup.coffee
  74. +20 −9 src/scripts/factoid.coffee
  75. +12 −3 src/scripts/fibonacci.coffee
  76. +15 −2 src/scripts/file-brain.coffee
  77. +14 −3 src/scripts/filmwise.coffee
  78. +13 −2 src/scripts/fishpun.coffee
  79. +14 −4 src/scripts/flattr.coffee
  80. +14 −0 src/scripts/flying-high.coffee
  81. +16 −2 src/scripts/fml.coffee
  82. +16 −12 src/scripts/fogbugz.coffee
  83. +13 −2 src/scripts/fortune.coffee
  84. +12 −3 src/scripts/gauges.coffee
  85. +12 −2 src/scripts/gemwhois.coffee
  86. +16 −4 src/scripts/gerrit.coffee
  87. +13 −2 src/scripts/getajob.coffee
  88. +15 −4 src/scripts/gifbin.coffee
  89. +14 −2 src/scripts/giftv.coffee
  90. +12 −7 src/scripts/git-help.coffee
  91. +13 −7 src/scripts/github-activity.coffee
  92. +14 −7 src/scripts/github-commiters.coffee
  93. +17 −7 src/scripts/github-credentials.coffee
  94. +14 −4 src/scripts/github-issue-link.coffee
  95. +22 −16 src/scripts/github-issues.coffee
  96. +20 −13 src/scripts/github-pulls.coffee
  97. +14 −1 src/scripts/gob.coffee
  98. +13 −5 src/scripts/good-night.coffee
  99. +16 −8 src/scripts/goodbad.coffee
  100. +13 −3 src/scripts/google-reader.coffee
  101. +16 −6 src/scripts/google-search-api.coffee
  102. +13 −3 src/scripts/google.coffee
  103. +13 −4 src/scripts/goooood.coffee
  104. +14 −9 src/scripts/graphite.coffee
  105. +19 −7 src/scripts/gtalk.coffee
  106. +16 −7 src/scripts/hackernews.coffee
  107. +16 −4 src/scripts/hangman.coffee
  108. +13 −3 src/scripts/hardradio.coffee
  109. +13 −2 src/scripts/hashing.coffee
  110. +12 −2 src/scripts/haters.coffee
  111. +15 −4 src/scripts/heroku-status.coffee
  112. +12 −2 src/scripts/hideyakids.coffee
  113. +13 −6 src/scripts/history.coffee
  114. +14 −1 src/scripts/horse.coffee
  115. +16 −28 src/scripts/iced-coffee-weather.coffee
  116. +13 −3 src/scripts/illogical.coffee
  117. +14 −0 src/scripts/inigo-montoya.coffee
  118. +14 −1 src/scripts/insult.coffee
  119. +13 −2 src/scripts/invalid.coffee
  120. +12 −4 src/scripts/isup.coffee
  121. +15 −9 src/scripts/itcrowd.coffee
  122. +13 −3 src/scripts/iwdrm.coffee
  123. +13 −2 src/scripts/janky.coffee
  124. +14 −1 src/scripts/javascript-sandbox.coffee
  125. +14 −8 src/scripts/jenkins.coffee
  126. +26 −22 src/scripts/jira.coffee
  127. +12 −2 src/scripts/joinme-generator.coffee
  128. +14 −2 src/scripts/jordan.coffee
  129. +19 −7 src/scripts/karma.coffee
  130. +16 −20 src/scripts/keep-alive.coffee
  131. +15 −5 src/scripts/kittens.coffee
  132. +13 −2 src/scripts/lastfm_np.coffee
  133. +13 −2 src/scripts/likeaboss.coffee
  134. +14 −2 src/scripts/linsanity.coffee
  135. +18 −11 src/scripts/list-jira-bugs.coffee
  136. +12 −6 src/scripts/lmgtfy.coffee
  137. +17 −6 src/scripts/location-decision-maker.coffee
  138. +15 −1 src/scripts/lolz.coffee
  139. +13 −3 src/scripts/look-of-disapproval.coffee
  140. +14 −4 src/scripts/lyrics.coffee
  141. +12 −2 src/scripts/manatee.coffee
  142. +14 −3 src/scripts/megusta.coffee
  143. +24 −23 src/scripts/meme_generator.coffee
  144. +17 −9 src/scripts/mitch-hedburg.coffee
  145. +14 −3 src/scripts/mite.coffee
  146. +14 −5 src/scripts/modulepuppy.coffee
  147. +11 −2 src/scripts/mta.coffee
  148. +12 −2 src/scripts/mtg.coffee
  149. +12 −7 src/scripts/myappstatus.coffee
  150. +12 −3 src/scripts/nettipot.coffee
  151. +17 −13 src/scripts/newrelic.coffee
  152. +14 −4 src/scripts/news.coffee
  153. +14 −13 src/scripts/nice.coffee
  154. +10 −10 src/scripts/notify.coffee
  155. +22 −17 src/scripts/oauth.coffee
  156. +14 −3 src/scripts/octocat.coffee
  157. +19 −18 src/scripts/octospy.coffee
  158. +16 −11 src/scripts/one_four_twentyfour.coffee
  159. +15 −3 src/scripts/penny-arcade.coffee
  160. +13 −1 src/scripts/ping.coffee
  161. +12 −7 src/scripts/pivotal.coffee
  162. +13 −5 src/scripts/pivotalstorylisten.coffee
  163. +28 −22 src/scripts/play.coffee
  164. +13 −4 src/scripts/pokefacts.coffee
  165. +12 −2 src/scripts/polite.coffee
  166. +17 −6 src/scripts/pomodoro.coffee
  167. +16 −3 src/scripts/prank-text.coffee
  168. +13 −2 src/scripts/punchfork.coffee
  169. +13 −1 src/scripts/put-it-back.coffee
  170. +13 −6 src/scripts/pypi.coffee
  171. +15 −3 src/scripts/quickmeme.coffee
  172. +15 −6 src/scripts/quote.coffee
  173. +12 −2 src/scripts/rageface.coffee
  174. +17 −13 src/scripts/rally.coffee
  175. +14 −1 src/scripts/reddit-jokes.coffee
  176. +15 −1 src/scripts/reddit-random-top.coffee
  177. +15 −4 src/scripts/reddit.coffee
  178. +15 −0 src/scripts/redis-brain.coffee
  179. +22 −25 src/scripts/redmine.coffee
  180. +13 −2 src/scripts/remind.coffee
  181. +13 −2 src/scripts/resque.coffee
  182. +12 −2 src/scripts/rimshot.coffee
  183. +14 −4 src/scripts/robot-memes.coffee
  184. +13 −10 src/scripts/roll.coffee
  185. +18 −11 src/scripts/rollout.coffee
  186. +13 −5 src/scripts/romanemperor.coffee
  187. +15 −7 src/scripts/rotten.coffee
  188. +12 −4 src/scripts/rsstodolist.coffee
  189. +14 −2 src/scripts/ruby.coffee
  190. +12 −2 src/scripts/rubygems.coffee
  191. +14 −5 src/scripts/salesforce.coffee
  192. +13 −11 src/scripts/scalarium.coffee
  193. +18 −10 src/scripts/scoutapp.coffee
  194. +13 −37 src/scripts/script.coffee
  195. +18 −9 src/scripts/sendgrid.coffee
  196. +13 −1 src/scripts/sensitive.coffee
  197. +14 −2 src/scripts/serenity.coffee
  198. +12 −2 src/scripts/shipit.coffee
  199. +14 −2 src/scripts/shorten.coffee
  200. +13 −1 src/scripts/sigh.coffee
  201. +15 −2 src/scripts/sms.coffee
  202. +14 −3 src/scripts/snow.coffee
  203. +13 −1 src/scripts/sonos.coffee
  204. +14 −4 src/scripts/sosearch.coffee
  205. +13 −4 src/scripts/speak.coffee
  206. +15 −15 src/scripts/spin.coffee
  207. +13 −3 src/scripts/spotify.coffee
  208. +18 −8 src/scripts/sprintly.coffee
  209. +18 −16 src/scripts/squeezebox.coffee
  210. +15 −4 src/scripts/stagehand.coffee
  211. +12 −3 src/scripts/stock.coffee
  212. +14 −3 src/scripts/stocks.coffee
  213. +16 −1 src/scripts/store-messages-couchdb.coffee
  214. +14 −3 src/scripts/sudo.coffee
  215. +18 −2 src/scripts/sugarcrm.coffee
  216. +13 −2 src/scripts/swanson.coffee
  217. +14 −0 src/scripts/sweetdude.coffee
  218. +15 −5 src/scripts/talkative.coffee
  219. +14 −4 src/scripts/tasks.coffee
  220. +22 −5 src/scripts/team-city-listener.coffee
  221. +15 −6 src/scripts/teamcity.coffee
  222. +14 −2 src/scripts/tell.coffee
  223. +18 −4 src/scripts/text.coffee
  224. +11 −2 src/scripts/thebattle.coffee
  225. +26 −16 src/scripts/trac.coffee
  226. +13 −5 src/scripts/train.coffee
  227. +11 −3 src/scripts/trajectorystorylisten.coffee
  228. +12 −2 src/scripts/travis.coffee
  229. +14 −5 src/scripts/trollicon.coffee
  230. +16 −6 src/scripts/truckstopsf.coffee
  231. +13 −2 src/scripts/tryerlang.coffee
  232. +13 −5 src/scripts/tumblr.coffee
  233. +15 −0 src/scripts/tvshow.coffee
  234. +14 −1 src/scripts/tweet-content.coffee
  235. +12 −2 src/scripts/tweet.coffee
  236. +16 −2 src/scripts/twitter.coffee
  237. +14 −3 src/scripts/twss.coffee
  238. +13 −5 src/scripts/uptime-robot.coffee
  239. +14 −1 src/scripts/uptime.coffee
  240. +15 −5 src/scripts/urban.coffee
  241. +14 −3 src/scripts/url.coffee
  242. +15 −9 src/scripts/vanity.coffee
  243. +15 −4 src/scripts/walmart.coffee
  244. +13 −2 src/scripts/wat.coffee
  245. +16 −3 src/scripts/weather.coffee
  246. +16 −2 src/scripts/web.coffee
  247. +14 −2 src/scripts/webshot.coffee
  248. +16 −2 src/scripts/whatis.coffee
  249. +14 −1 src/scripts/wheninaustin.coffee
  250. +14 −3 src/scripts/whos-turn.coffee
  251. +15 −26 src/scripts/wikipedia.coffee
  252. +15 −3 src/scripts/wolfram.coffee
  253. +19 −6 src/scripts/word-of-the-day.coffee
  254. +21 −4 src/scripts/wordnik.coffee
  255. +16 −5 src/scripts/wunderground.coffee
  256. +22 −14 src/scripts/wunderlist.coffee
  257. +14 −3 src/scripts/xkcd.coffee
  258. +13 −3 src/scripts/xmas.js
  259. +16 −1 src/scripts/yoda-pictures.coffee
  260. +12 −3 src/scripts/yoda-quotes.coffee
  261. +14 −1 src/scripts/yomama.coffee
  262. +18 −2 src/scripts/yuno.coffee
View
72 README.md
@@ -1,7 +1,13 @@
# hubot-scripts
-These are a collection of community scripts for
-[Hubot](https://github.com/github/hubot), a chat bot for your company.
+These are a collection of community scripts for [hubot][hubot], a chat bot for
+your company.
+
+
+## Discovering
+
+Check out the [hubot-script-catalog][script-catalog] for a list and description
+of all the available scripts.
## Installing
@@ -10,33 +16,67 @@ right into your generated Hubot installation. Just put them in `scripts`, add
the new scripts to the `hubot-scripts.json` file.
Any third-party dependencies for scripts need adding your your `package.json`
-otherwise a lot of errors will be thrown during the start up of your hubot.
+otherwise a lot of errors will be thrown during the start up of your hubot. You
+can find a list of dependencies for a script in the documentation header at the
+top of the script.
Restart your robot, and you're good to go.
-All the scripts in this repository are located in
-[`src/scripts`](https://github.com/github/hubot-scripts/tree/master/src/scripts).
+All the scripts in this repository are located in [`src/scripts`][src-scripts].
## Writing
Want to write your own Hubot script? The best way is to take a look at an
-[existing script](https://github.com/github/hubot-scripts/blob/master/src/scripts/tweet.coffee)
-and see how things are set up. Hubot scripts are written in CoffeeScript, a
-higher-level implementation of JavaScript.
+[existing script][example-script] and see how things are set up. Hubot scripts
+are written in CoffeeScript, a higher-level implementation of JavaScript.
-You'll also want to [add tests](https://github.com/github/hubot-scripts/blob/master/test/tests.coffee)
-for your script; no one likes untested code. It makes Hubot sad.
+You'll also want to [add tests][hubot-script-tests] for your script; no one
+likes untested code. It makes Hubot sad.
-Additionally, it's extremely helpful to add [TomDoc](http://tomdoc.org) to the
-top of each file. (Check out [an example](https://github.com/github/hubot-scripts/blob/master/src/scripts/speak.coffee#L1-5)).
-We'll pull out the commands from those lines and display them in the generic,
-robot-wide `hubot help` command.
+Additionally, it's extremely helpful to add [TomDoc][tomdoc] to the top of each
+file. (Check out [an example][example-script-doc]). We'll pull out the commands
+from those lines and display them in the generic, robot-wide `hubot help`
+command.
Please note we're no longer including external dependencies in the
`package.json`, so should you wish to include them please include the package
name and required version in the TomDoc comments at the top of your script.
-## Discovering
+## Documentation
+
+We're now requiring all scripts in hubot-scripts to contain a documentation
+header so people know every thing about the script.
+
+```coffeescript
+# Description
+# <description of the scripts functionality>
+#
+# Dependencies:
+# "<module name>": "<module version>"
+#
+# Configuration:
+# LIST_OF_ENV_VARS_TO_SET
+#
+# Commands:
+# hubot <trigger> - <what the respond trigger does>
+# <trigger> - <what the hear trigger does>
+#
+# Notes:
+# <optional notes required for the script>
+#
+# Author:
+# <github username of the original script author>
+```
-[The Script Catalog](http://hubot-script-catalog.herokuapp.com/)
+If you have nothing to fill in for a section you should include `None` in that
+section. Empty sections which are optional should be left blank. A script will
+be required to fill out the documentation before being merged into the
+repository.
+[hubot]: https://github.com/github/hubot
+[script-catalog]: http://hubot-script-catalog.herokuapp.com
+[src-scripts]: https://github.com/github/hubot-scripts/tree/master/src/scripts
+[tomdoc]: http://tomdoc.org
+[example-script]: https://github.com/github/hubot-scripts/blob/master/src/scripts/tweet.coffee
+[hubot-script-tests]: https://github.com/github/hubot-scripts/blob/master/test/tests.coffee
+[example-script-docs]: (https://github.com/github/hubot-scripts/blob/master/src/scripts/speak.coffee#L1-5
View
20 src/scripts/46elks.coffee
@@ -1,10 +1,20 @@
-# Allows Hubot to send text messages using 46elks.com API.
+# Description:
+# Allows Hubot to send text messages using 46elks.com API.
#
-# you need to set HUBOT_46ELKS_USERNAME and HUBOT_46ELKS_PASSWORD
+# Dependencies:
+# None
#
-# hubot sms <user> <message> - Sends <message> to the number <to>.
-# hubot <user> has phone number <phone> - Sets the phone number of <user> to <phone>.
-# hubot give me the phone number to <user> - Gets the phone number of <user>.e
+# Configuration:
+# HUBOT_46ELKS_USERNAME
+# HUBOT_46ELKS_PASSWORD
+#
+# Commands:
+# hubot sms <user> <message> - Sends <message> to the number <to>
+# hubot <user> has phone number <phone> - Sets the phone number of <user> to <phone>
+# hubot give me the phone number to <user> - Gets the phone number of <user>
+#
+# Author:
+# kimf
QS = require "querystring"
module.exports = (robot) ->
View
19 src/scripts/9gag.coffee
@@ -1,7 +1,18 @@
-# hubot 9gag me - Returns a random meme image.
-
-# Random meme from 9gag
-# Rewrite by Enrique Vidal
+# Description:
+# None

You could probably put the description here to be "Returns a random meme image", but not a huge deal I think.

@technicalpickles GitHub member

For scripts that are a single trigger, with the help command being enough to explain it, I almost think Description isn't really necessary. It's just copy-pasta, that doesn't add anything compared to the usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+#
+# Dependencies:
+# "htmlparser": "1.7.6"
+# "soupselect: "0.2.0"
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot 9gag me - Returns a random meme image
+#
+# Author:
+# EnriqueVidal
Select = require( "soupselect" ).select
HTMLParser = require "htmlparser"
View
38 src/scripts/abstract.coffee
@@ -1,27 +1,17 @@
-# hubot abstract <topic> - Prints a nice abstract of the given topic.
-
-# Copyright (c) 2011 John Tantalo
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use,
-# copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following
-# conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
+# Description:
+# None

Again, here the description could be "Prints a nice abstract of the given topic"

@technicalpickles GitHub member

It's also a little fuzzy if we should be removing licensing stuff that people add to their scripts. Or, we have to assume they are being made under hubot-script's license, and remove it from all the scripts that have it.

@tombell
tombell added a note

When people usually contribute to an open source project the license is usually the one of the actual project. If the license differs to the hubot-scripts license, then people should release the script in it's own package in my opinion.

I have to agree with @tombell here.

It should probably be part of the submission guidelines or something. Are there any actually?

@technicalpickles GitHub member

Sounds good to me. There isn't a guideline, but there should be. The README is going to be the best place for that, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot abstract <topic> - Prints a nice abstract of the given topic
+#
+# Author:
+# tantalor
module.exports = (robot) ->
robot.respond /(abs|abstract) (.+)/i, (res) ->
View
14 src/scripts/achievement_unlocked.coffee
@@ -1,6 +1,18 @@
+# Description:
+# None

This could actually use a description, but should probably be a separate issue. i have no idea what the heck this does from reading the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
#
-# hubot achievement get <achievement> [achiever's gravatar email] - life goals are in reach.
+# Dependencies:
+# None
#
+# Configuration:
+# None
+#
+# Commands:
+# hubot achievement get <achievement> [achiever's gravatar email] - life goals are in reach
+#
+# Author:
+# Chris
+
module.exports = (robot) ->
robot.hear /achievement (get|unlock(ed)?) (.+?)(\s*[^@\s]+@[^@\s]+)?\s*$/i, (msg) ->
caption = msg.match[3]
View
14 src/scripts/ackbar.coffee
@@ -1,7 +1,17 @@
-# It's a trap
+# Description:
+# None

Seems there are quite a lot of blank descriptions or the description is in the command. Perhaps a separate pull request once the formatting is at least in place would be warranted instead of pointing them all out here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
#
-# trap - Display an Admiral Ackbar piece of wonder
+# Dependencies:
+# None
#
+# Configuration:
+# None
+#
+# Commands:
+# trap - Display an Admiral Ackbar piece of wonder
+#
+# Author:
+# brilliantfantastic
ackbars = [
"http://dayofthejedi.com/wp-content/uploads/2011/03/171.jpg",
View
18 src/scripts/adult.coffee
@@ -1,5 +1,17 @@
-# Display a hyperbole and a half image if anyone says "like an adult"
+# Description:
+# None
#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# like an adult - Display a hyperbole and a half image
+#
+# Author:
+# atmos
images = [
"http://1.bp.blogspot.com/_D_Z-D2tzi14/TBpOnhVqyAI/AAAAAAAADFU/8tfM4E_Z4pU/s400/responsibility12(alternate).png",
@@ -15,7 +27,3 @@ images = [
module.exports = (robot) ->
robot.hear /like an adult/i, (msg) ->
msg.send msg.random images
-
-# Be an adult
-# This is Why I'll Never be an Adult:
-# Taken from: http://hyperboleandahalf.blogspot.com/2010/06/this-is-why-ill-never-be-adult.html
View
30 src/scripts/airbrake.coffee
@@ -1,26 +1,28 @@
-# Returns error info from Airbrake
+# Description:
+# None
#
-# hubot show me airbrake errors - Get the most recent active errors
+# Dependencies:
+# "jsdom": "0.2.14"
+#
+# Configuration:
+# HUBOT_AIRBRAKE_AUTH_TOKEN
+# HUBOT_AIRBRAKE_PROJECT
+#
+# Commands:
+# hubot show me airbrake errors - Get the most recent active errors
+#
+# Author:
+# tommeier
+
jsdom = require 'jsdom'
env = process.env
-# ENV Variables required :
-# HUBOT_AIRBRAKE_AUTH_TOKEN : Auth token from your account ( Login to site and go to 'Settings' )
-# HUBOT_AIRBRAKE_PROJECT : Account name (eg: http://<account name>.airbrakeapp.com)
-
-# Add to heroku :
-# % heroku config:add HUBOT_AIRBRAKE_AUTH_TOKEN="..."
-# % heroku config:add HUBOT_AIRBRAKE_PROJECT="..."
-# Example error and further API :
-# http://help.airbrake.io/kb/api-2/api-overview
-
module.exports = (robot) ->
robot.respond /(show me )?airbrake( errors)?(.*)/i, (msg) ->
query msg, (body, err, project_name) ->
return msg.send err if err
-
error_groups = body.getElementsByTagName("group")
return msg.send "Congrats! No errors in the system right now!" unless error_groups?
@@ -79,5 +81,3 @@ module.exports = (robot) ->
catch err
err = "Could not fetch airbrake errors."
cb(body, err, airbrake_project)
-
-
View
15 src/scripts/alot.coffee
@@ -1,6 +1,17 @@
-#display images of alots
+# Description:
+# None
#
-# alot - shows a picture of an alot
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# alot - Shows a picture of an alot
+#
+# Author:
+# tbwIII
images = [
"http://4.bp.blogspot.com/_D_Z-D2tzi14/S8TRIo4br3I/AAAAAAAACv4/Zh7_GcMlRKo/s400/ALOT.png",
View
15 src/scripts/ambush.coffee
@@ -1,6 +1,17 @@
-# Send messages to users the next time they speak
+# Description:
+# Send messages to users the next time they speak
#
-# hubot ambush <user name>: <message>
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot ambush <user name>: <message>
+#
+# Author:
+# jmoses
appendAmbush = (data, toUser, fromUser, message) ->
if data[toUser.name]
View
16 src/scripts/animal.coffee
@@ -1,7 +1,19 @@
-# Because animals are animals.
+# Description:
+# Because animals are animals.
#
-# hubot animal me - Grab a random gif from http://animalsbeingdicks.com/
+# Dependencies:
+# "htmlparser": "1.7.6"
+# "soupselect: "0.2.0"
#
+# Configuration:
+# None
+#
+# Commands:
+# hubot animal me - Grab a random gif from http://animalsbeingdicks.com/
+#
+# Author:
+# unsay
+
Select = require("soupselect").select
HtmlParser = require "htmlparser"
View
25 src/scripts/archer.coffee
@@ -1,14 +1,16 @@
-# Make hubot fetch quotes pertaining to the world's best secret agent, Archer.
-# Hubot.
-# HUBOT.
-# HUBOT!!!!
-# WHAT?
-# DANGER ZONE.
+# Description:
+# Make hubot fetch quotes pertaining to the world's best secret agent, Archer.
#
-# get archer
-
-# REQUIRED MODULES
-# npm install scraper
+# Dependencies:
+# "scraper": "0.0.9"
+#
+# Configuration:
+# None
+#
+# Commands:
+#
+# Author:
+# rrix
scraper = require 'scraper'
@@ -29,7 +31,7 @@ module.exports = (robot) ->
robot.hear /archer/i, (msg) ->
options = {
- 'uri': 'http://en.wikiquote.org/wiki/Archer_(TV_series)',
+ 'uri': 'http://en.wikiquote.org/wiki/Archer_(TV_series)',
'headers': {
'User-Agent': 'User-Agent: Archerbot for Hubot (+https://github.com/github/hubot-scripts)'
}
@@ -42,4 +44,3 @@ module.exports = (robot) ->
quote = quotes[Math.floor(Math.random()*quotes.length)]
dialog += jQuery(quote).text().trim() + "\n"
msg.send dialog
-
View
22 src/scripts/asana.coffee
@@ -1,12 +1,18 @@
-# A way to add tasks to Asana
+# Description:
+# A way to add tasks to Asana
#
-# todo: @name? <task directive> - public message starting with todo: will
-# add task, optional @name to assign task
-# @bot todo users - Message the bot directly to list all
-# available users in the workspace
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# todo: @name? <task directive> - public message starting with todo: will add task, optional @name to assign task
+# hubot todo users - Message the bot directly to list all available users in the workspace
#
-# Written by @idPro
-
+# Author:
+# idpro
url = 'https://app.asana.com/api/1.0'
@@ -81,4 +87,4 @@ module.exports = (robot) ->
for user in response.data
userList += "#{user.id} : #{user.name}\n"
- msg.send userList
+ msg.send userList
View
15 src/scripts/ascii.coffee
@@ -1,6 +1,17 @@
-# ASCII art.
+# Description:
+# ASCII art
#
-# hubot ascii me <text> - Show text in ascii art.
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# hubot ascii me <text> - Show text in ascii art
+#
+# Author:
+# atmos
module.exports = (robot) ->
robot.respond /ascii( me)? (.+)/i, (msg) ->
View
30 src/scripts/auth.coffee
@@ -1,29 +1,33 @@
-# Auth allows you to assign roles to users which can be used by other scripts to restrict access to Hubot commands
+# Description:
+# Auth allows you to assign roles to users which can be used by other scripts
+# to restrict access to Hubot commands
#
-# hubot <user> has <role> role - Assigns a role to a user
-# hubot <user> doesn't have <role> role - Removes a role from a user
-# hubot what role does <user> have - Find out what roles are assigned to a specific user
-# hubot who has admin role - Find out who's an admin and can assign roles
+# Dependencies:
+# None
#
-# Environment variables:
-# * HUBOT_AUTH_ADMIN
+# Configuration:
+# HUBOT_AUTH_ADMIN
#
-# Use in your script:
+# Commands:
+# hubot <user> has <role> role - Assigns a role to a user
+# hubot <user> doesn't have <role> role - Removes a role from a user
+# hubot what role does <user> have - Find out what roles are assigned to a specific user
+# hubot who has admin role - Find out who's an admin and can assign roles
+#
+# Notes:
# * Call the method: robot.Auth.hasRole('<user>','<role>')
# * returns bool true or false
#
-# Notes:
# * the 'admin' role can only be assigned through the environment variable
# * roles are all transformed to lower case
#
-
-# hubot alex has role op
-
+# Author:
+# alexwilliamsca
module.exports = (robot) ->
admin = process.env.HUBOT_AUTH_ADMIN
- class Auth
+ class Auth
hasRole: (name, role) ->
user = robot.userForName(name)
if user? and user.roles?
View
14 src/scripts/auto-stache.coffee
@@ -1,5 +1,17 @@
-# Automatically add mustaches to any images it can
+# Description:
+# Automatically add mustaches to any images it can
#
+# Dependencies:
+# None
+#
+# Configuration:
+# None
+#
+# Commands:
+# None

Commands: None? Shouldn't this be required?

@technicalpickles GitHub member

Not strictly speaking. You can have scripts that are just doing routing stuff, for example. In this case, 'command' isn't really accurate. It's more the things it will hear and respond to, ie URLs with png, jpg, gif.

@tombell
tombell added a note

Here the description will suffice, commands imply something you type to trigger it, where as this just detects URLs.

Yeah, I think there are a few that listen for particular things. In this case an image. I wonder if cases here it's more of a listener than a command that we can list that, perhaps in notes? This one is probably explanatory enough within the description.

@tombell
tombell added a note

Might be a better option to rename Commands: to Triggers: which will cover everything. Thoughts?

++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+#
+# Author:
+# atmos
module.exports = (robot) ->
robot.hear /^(https?:\/\/[^ #]+\.(?:png|jpg|jpeg))(?:[#]\.png)?$/i, (msg) ->
View
39 src/scripts/aws.coffee
@@ -1,23 +1,30 @@
-# Queries for the status of AWS services
+# Description:
+# Queries for the status of AWS services
#
-# hubot sqs status - Returns the status of SQS queues.
-# hubot ec2 status - Returns the status of EC2 instances.
+# Dependencies:
+# "aws2js": "0.6.12"
+# "underscore": "1.3.3"
+# "moment": "1.6.2"
#
-
-# Environment variables:
-# HUBOT_AWS_ACCESS_KEY_ID - The Amazon access key id
-# HUBOT_AWS_SECRET_ACCESS_KEY - The Amazon secret key for the given id
-# HUBOT_AWS_SQS_REGIONS - Comma separated list of regions to query
-# HUBOT_AWS_EC2_REGIONS - Comma separated list of regions to query
+# Configuration:
+# HUBOT_AWS_ACCESS_KEY_ID
+# HUBOT_AWS_SECRET_ACCESS_KEY
+# HUBOT_AWS_SQS_REGIONS
+# HUBOT_AWS_EC2_REGIONS
#
-# package.json needs to have "aws2js":"0.6.12" and "moment":"1.6.2" and "underscore":"1.3.3"
+# Commands:
+# hubot sqs status - Returns the status of SQS queues

Think we're missing a command here. Looks like the original doc header had two commands.

# hubot sqs status - Returns the status of SQS queues.
# hubot ec2 status - Returns the status of EC2 instances.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+# hubot ec2 status - Returns the status of EC2 instances
#
-# It's highly recommended to use a read-only IAM account for this purpose
-# https://console.aws.amazon.com/iam/home?#
+# Notes:
+# It's highly recommended to use a read-only IAM account for this purpose
+# https://console.aws.amazon.com/iam/home?
+# SQS - requires ListQueues, GetQueueAttributes and ReceiveMessage
+# EC2 - requires EC2:Describe*, elasticloadbalancing:Describe*, cloudwatch:ListMetrics,
+# cloudwatch:GetMetricStatistics, cloudwatch:Describe*, autoscaling:Describe*
#
-# SQS - requires ListQueues, GetQueueAttributes and ReceiveMessage
-# EC2 - requires EC2:Describe*, elasticloadbalancing:Describe*, cloudwatch:ListMetrics,
-# cloudwatch:GetMetricStatistics, cloudwatch:Describe*, autoscaling:Describe*
+# Author:
+# Ethan J. Brown
key = process.env.HUBOT_AWS_ACCESS_KEY_ID
secret = process.env.HUBOT_AWS_SECRET_ACCESS_KEY