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.
|
|
|
|
|
2022-09-09 02:23:45 +02:00
|
|
|
1. In your Hubot's directory, install the Zulip adapter. Run:
|
2017-06-21 05:56:25 +02:00
|
|
|
`npm install --save hubot-zulip`
|
|
|
|
|
2022-09-09 02:23:45 +02:00
|
|
|
1. {!create-a-generic-bot.md!}
|
|
|
|
Note its username, API key and full name; you will use them
|
|
|
|
on the next step.
|
2017-06-21 05:56:25 +02:00
|
|
|
|
2022-09-09 02:23:45 +02:00
|
|
|
1. To run Hubot locally, first, set the following environment
|
2017-06-21 05:56:25 +02:00
|
|
|
variables by running:
|
|
|
|
|
2023-02-28 16:24:17 +01:00
|
|
|
```
|
|
|
|
export HUBOT_ZULIP_SITE="{{ api_url }}"
|
|
|
|
export HUBOT_ZULIP_BOT="hubot-bot@example.com"
|
|
|
|
export HUBOT_ZULIP_API_KEY="your_key"
|
|
|
|
```
|
2017-06-21 05:56:25 +02:00
|
|
|
|
2023-02-28 16:24:17 +01:00
|
|
|
Then, run:
|
2017-06-21 05:56:25 +02:00
|
|
|
|
2023-02-28 16:24:17 +01:00
|
|
|
`bin/hubot --adapter zulip --name "myhubot"`
|
2017-06-21 05:56:25 +02:00
|
|
|
|
2023-02-28 16:24:17 +01:00
|
|
|
The `--name` parameter must match the name you gave the bot on
|
|
|
|
the settings page.
|
2017-06-21 05:56:25 +02:00
|
|
|
|
|
|
|
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:
|
|
|
|
|
2020-08-05 11:50:17 +02:00
|
|
|
![Hubot message](/static/images/integrations/hubot/001.png)
|
2017-06-21 05:56:25 +02:00
|
|
|
|
|
|
|
[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
|