integration-docs: Update Hubot for new doc format.

Part of zulip#29592.
This commit is contained in:
Niloth P 2024-11-14 17:36:26 +05:30
parent 59ef4c9ea5
commit 847da22ec6
1 changed files with 19 additions and 16 deletions

View File

@ -1,18 +1,21 @@
# Zulip Hubot Integration
{start_tabs}
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.
1. In your Hubot's directory, install the Zulip adapter. Run:
`npm install --save hubot-zulip`
1. In your Hubot's directory, install the Zulip adapter by running:
`npm install --save hubot-zulip`
1. {!create-a-generic-bot.md!}
Note its username, API key and full name; you will use them
on the next step.
Note its full name and API key, as you will need them next.
1. To run Hubot locally, first, set the following environment
variables by running:
1. To run Hubot locally, set the following environment variables:
```
export HUBOT_ZULIP_SITE="{{ api_url }}"
@ -22,22 +25,22 @@
Then, run:
`bin/hubot --adapter zulip --name "myhubot"`
`bin/hubot --adapter zulip --name "<bot username>"`
The `--name` parameter must match the name you gave the bot on
the settings page.
!!! tip ""
Hubot will automatically listen for commands on all public streams.
You can also invite Hubot to private streams.
Hubot automatically listens for commands on all public channels. Private
channels require an invitation.
{end_tabs}
To test your Hubot installation, send it an @-notification with a
basic command, for example `@Hubot pug me`, which should produce a
basic command, e.g., `@Hubot pug me`, which should produce a
result like this:
![Hubot message](/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
### Related documentation
[Check out all integrations available via Hubot][2]
[2]: https://github.com/hubot-scripts
* [The hubot-zulip adapter on GitHub][1]
[1]: https://github.com/zulip/hubot-zulip