Skip to content
Newer
Older
100644 97 lines (73 sloc) 3.79 KB
0604c5d @holman hubot-scripts readme should be about scripts
holman authored Sep 27, 2011
1 # hubot-scripts
950a394 @atmos add speak as the first example
atmos authored Sep 7, 2011
2
c7a4185 @tombell Minor README update
tombell authored Jun 12, 2012
3 These are a collection of community scripts for [hubot][hubot], a chat bot for
4 your company.
5
cbfabb4 @technicalpickles Explicitly say this is deprecated and not receiving new scripts, and …
technicalpickles authored Dec 4, 2014
6 **Imporant**: this repository is no longer accepting new scripts. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details.
a7f0cc1 @technicalpickles Link to CONTRIBUTING.md in README, to help prevent people from submit…
technicalpickles authored Aug 15, 2014
7
fdbfea7 @mrowe Fix URL for "hubot-scripts organisation" link
mrowe authored Feb 12, 2015
8 There is a new system for distributing scripts, and adding them to your own hubot. Locate the appropriate script in the [hubot-scripts organization](https://github.com/hubot-scripts) or on [npm tagged as *hubot-scripts*](https://www.npmjs.org/browse/keyword/hubot-scripts), and follow the script's documentation. In general, this will be something like:
cbfabb4 @technicalpickles Explicitly say this is deprecated and not receiving new scripts, and …
technicalpickles authored Dec 4, 2014
9
10 1. Add a line to external-scripts.json
11 2. Add a line to package.json
12 3. Add environment variables, depending on the script
c7a4185 @tombell Minor README update
tombell authored Jun 12, 2012
13
14 ## Discovering
15
16 Check out the [hubot-script-catalog][script-catalog] for a list and description
17 of all the available scripts.
950a394 @atmos add speak as the first example
atmos authored Sep 8, 2011
18
0604c5d @holman hubot-scripts readme should be about scripts
holman authored Sep 27, 2011
19 ## Installing
950a394 @atmos add speak as the first example
atmos authored Sep 8, 2011
20
dfb3c8c @tombell Remove bin/hubot and update package.json
tombell authored Mar 12, 2013
21 Once you have Hubot installed, you should already have `hubot-scripts`
22 installed. Check `package.json` to be sure. If that is the case, you update
23 `hubot-scripts.json` to list any scripts from this repository you want to load.
24 The default `hubot-scripts.json` looks like:
cb2dfce @technicalpickles Updated installation instructions
technicalpickles authored Feb 24, 2013
25
aa27838 @y-yagi Remove tweet.coffee
y-yagi authored Aug 2, 2014
26 ["redis-brain.coffee", "shipit.coffee"]
327341d @technicalpickles newline fixes
technicalpickles authored Dec 4, 2014
27
dfb3c8c @tombell Remove bin/hubot and update package.json
tombell authored Mar 12, 2013
28 If you update `hubot-scripts` in `package.json`, you will automatically get
29 updates to your scripts listed here.
327341d @technicalpickles newline fixes
technicalpickles authored Dec 4, 2014
30
dfb3c8c @tombell Remove bin/hubot and update package.json
tombell authored Mar 12, 2013
31 Alternatively, you can copy files from this repository into your `scripts`
32 directory. Note that you would not get updates from the `hubot-scripts`
33 repository unless you copy them yourself.
34
35 Any third-party dependencies for scripts need the addition of your
36 `package.json` otherwise a lot of errors will be thrown during the start up of
37 your hubot. You can find a list of dependencies for a script in the
38 documentation header at the top of the script.
d75a9a1 @tombell Update README.md to include details about dependencies
tombell authored May 26, 2012
39
40 Restart your robot, and you're good to go.
950a394 @atmos add speak as the first example
atmos authored Sep 8, 2011
41
c7a4185 @tombell Minor README update
tombell authored Jun 12, 2012
42 All the scripts in this repository are located in [`src/scripts`][src-scripts].
950a394 @atmos add speak as the first example
atmos authored Sep 8, 2011
43
0604c5d @holman hubot-scripts readme should be about scripts
holman authored Sep 27, 2011
44 ## Writing
950a394 @atmos add speak as the first example
atmos authored Sep 8, 2011
45
0604c5d @holman hubot-scripts readme should be about scripts
holman authored Sep 27, 2011
46 Want to write your own Hubot script? The best way is to take a look at an
c7a4185 @tombell Minor README update
tombell authored Jun 12, 2012
47 [existing script][example-script] and see how things are set up. Hubot scripts
48 are written in CoffeeScript, a higher-level implementation of JavaScript.
0604c5d @holman hubot-scripts readme should be about scripts
holman authored Sep 27, 2011
49
c7a4185 @tombell Minor README update
tombell authored Jun 12, 2012
50 Additionally, it's extremely helpful to add [TomDoc][tomdoc] to the top of each
51 file. (Check out [an example][example-script-doc]). We'll pull out the commands
52 from those lines and display them in the generic, robot-wide `hubot help`
53 command.
edebd3e @markomanninen spin.coffee header and description added on read me file
markomanninen authored Oct 30, 2011
54
c7c927e @tombell Add notice about dependencies
tombell authored Apr 10, 2012
55 Please note we're no longer including external dependencies in the
56 `package.json`, so should you wish to include them please include the package
57 name and required version in the TomDoc comments at the top of your script.
58
d8a62a3 @tombell Update README to include section of documentation changes
tombell authored Jun 9, 2012
59 ## Documentation
60
61 We're now requiring all scripts in hubot-scripts to contain a documentation
9f73068 @topiaruss fix typo
topiaruss authored Apr 5, 2014
62 header so people know everything about the script.
d8a62a3 @tombell Update README to include section of documentation changes
tombell authored Jun 9, 2012
63
64 ```coffeescript
65 # Description
66 # <description of the scripts functionality>
67 #
68 # Dependencies:
69 # "<module name>": "<module version>"
70 #
71 # Configuration:
72 # LIST_OF_ENV_VARS_TO_SET
73 #
74 # Commands:
75 # hubot <trigger> - <what the respond trigger does>
76 # <trigger> - <what the hear trigger does>
77 #
78 # Notes:
79 # <optional notes required for the script>
80 #
81 # Author:
82 # <github username of the original script author>
83 ```
84
85 If you have nothing to fill in for a section you should include `None` in that
c7a4185 @tombell Minor README update
tombell authored Jun 12, 2012
86 section. Empty sections which are optional should be left blank. A script will
87 be required to fill out the documentation before being merged into the
88 repository.
89
90 [hubot]: https://github.com/github/hubot
91 [script-catalog]: http://hubot-script-catalog.herokuapp.com
92 [src-scripts]: https://github.com/github/hubot-scripts/tree/master/src/scripts
93 [tomdoc]: http://tomdoc.org
327341d @technicalpickles newline fixes
technicalpickles authored Dec 4, 2014
94 [example-script]: https://github.com/github/hubot-scripts/blob/master/src/scripts/tweet.coffee
c7a4185 @tombell Minor README update
tombell authored Jun 12, 2012
95 [hubot-script-tests]: https://github.com/github/hubot-scripts/blob/master/test/tests.coffee
7698b03 example-script-doc link
cflores authored Aug 13, 2012
96 [example-script-doc]: https://github.com/github/hubot-scripts/blob/master/src/scripts/speak.coffee#L1-5
Something went wrong with that request. Please try again.