2017-06-21 05:56:25 +02:00
|
|
|
1. Follow the **Getting Started with Hubot** section of the
|
|
|
|
[Hubot README](https://hubot.github.com/docs/#getting-started-with-hubot)
|
|
|
|
to create your Hubot. You'll have a new directory from
|
|
|
|
which `bin/hubot` starts a vanilla Hubot instance with
|
|
|
|
the shell backend.
|
|
|
|
|
|
|
|
2. In your Hubot's directory, install the Zulip adapter. Run:
|
|
|
|
`npm install --save hubot-zulip`
|
|
|
|
|
|
|
|
3. On your {{ settings_html|safe }}, create a bot account. Note
|
|
|
|
its username, API key and full name; you will use them on the
|
|
|
|
next step.
|
|
|
|
|
|
|
|
4. To run Hubot locally, first, set the following environment
|
|
|
|
variables by running:
|
|
|
|
|
|
|
|
```
|
2017-11-02 01:06:08 +01:00
|
|
|
export HUBOT_ZULIP_SITE="{{ api_url }}"
|
2017-06-21 05:56:25 +02:00
|
|
|
export HUBOT_ZULIP_BOT="hubot-bot@example.com"
|
|
|
|
export HUBOT_ZULIP_API_KEY="your_key"
|
|
|
|
```
|
|
|
|
|
|
|
|
Then, run:
|
|
|
|
|
|
|
|
`bin/hubot --adapter zulip --name "myhubot"`
|
|
|
|
|
|
|
|
The `--name` parameter must match the name you gave the bot on
|
|
|
|
the settings page.
|
|
|
|
|
|
|
|
Hubot will automatically listen for commands on all public streams.
|
2018-06-08 22:05:07 +02:00
|
|
|
You can also invite Hubot to private streams.
|
2017-06-21 05:56:25 +02:00
|
|
|
|
|
|
|
To test your Hubot installation, send it an @-notification with a
|
|
|
|
basic command, for example `@Hubot pug me`, which should produce a
|
|
|
|
result like this:
|
|
|
|
|
|
|
|
![](/static/images/integrations/hubot/001.png)
|
|
|
|
|
|
|
|
[Source code for the hubot-zulip adapter is available on GitHub][1]
|
|
|
|
[1]: https://github.com/zulip/hubot-zulip
|
|
|
|
|
2017-07-25 03:15:21 +02:00
|
|
|
[Check out all integrations available via Hubot][2]
|
|
|
|
[2]: https://github.com/hubot-scripts
|