From 34500f755c6bbba2327bf677d6b76b84e182c232 Mon Sep 17 00:00:00 2001 From: Tomasz Kolek Date: Wed, 5 Apr 2017 07:23:24 +0200 Subject: [PATCH] integrations doc: Move hubot doc to separate file. --- templates/zerver/integrations/hubot.html | 48 ++++++++++++++++++++++++ templates/zerver/integrations/index.html | 41 -------------------- zerver/lib/integrations.py | 2 +- 3 files changed, 49 insertions(+), 42 deletions(-) create mode 100644 templates/zerver/integrations/hubot.html diff --git a/templates/zerver/integrations/hubot.html b/templates/zerver/integrations/hubot.html new file mode 100644 index 0000000000..fc7cba767e --- /dev/null +++ b/templates/zerver/integrations/hubot.html @@ -0,0 +1,48 @@ +
    +
  1. +

    + Follow the "Getting Started with Hubot" section of the + Hubot README to create your Hubot. + You'll have a new directory from which bin/hubot starts a vanilla Hubot instance with the shell + backend. +

    +
  2. + +
  3. In your Hubot's directory, install the Zulip adapter. Run: +
    npm install --save hubot-zulip
    +
  4. + +
  5. +

    + 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. +

    +
  6. + +
  7. To run Hubot locally, use: +
    HUBOT_ZULIP_SITE={{ external_api_path_subdomain }} HUBOT_ZULIP_BOT=hubot-bot@example.com HUBOT_ZULIP_API_KEY=your_key bin/hubot --adapter zulip --name "myhubot"
    + +
  8. +
+ +

+ The bot account email address and API key are passed to Hubot via environment variables + HUBOT_ZULIP_BOT and HUBOT_ZULIP_API_KEY. 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. You can also invite Hubot to invite-only + streams. +

+ +

+ 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: +

+ + + +

Source code for the hubot-zulip adapter is available on GitHub. +

+

Check out additional Zulip integrations available via Hubot

diff --git a/templates/zerver/integrations/index.html b/templates/zerver/integrations/index.html index ffebbb96bd..e65a55f4aa 100644 --- a/templates/zerver/integrations/index.html +++ b/templates/zerver/integrations/index.html @@ -117,47 +117,6 @@ {% endif %} -
- - -
    -
  1. Follow the "Getting Started with Hubot" section of the Hubot README to create your Hubot. You'll have a new directory from which bin/hubot starts a vanilla Hubot instance with the shell backend.

  2. - -
  3. In your Hubot's directory, install the Zulip adapter. Run: -
    npm install --save hubot-zulip
    -
  4. - -
  5. 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.

  6. - -
  7. To run Hubot locally, use: -
    HUBOT_ZULIP_SITE={{ external_api_path_subdomain }} HUBOT_ZULIP_BOT=hubot-bot@example.com HUBOT_ZULIP_API_KEY=your_key bin/hubot --adapter zulip --name "myhubot"
    - -
  8. -
- -

The bot account email address and API key are passed to Hubot via environment variables HUBOT_ZULIP_BOT and HUBOT_ZULIP_API_KEY. 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. You can also invite Hubot to invite-only streams. -

- -

- 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: -

- - - -

Source code for the hubot-zulip adapter is available on GitHub.

-

Check out additional Zulip integrations available via Hubot

- -

- Logos are trademarks of their respective owners. - None of the integrations on this page are created by, - affiliated with, or supported by the companies - represented by the logos. -

-
-
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py index 2c06fb105b..990f07816c 100644 --- a/zerver/lib/integrations.py +++ b/zerver/lib/integrations.py @@ -194,7 +194,7 @@ INTEGRATIONS = { display_name='Google Calendar', doc='zerver/integrations/google-calendar.html' ), - 'hubot': Integration('hubot', 'hubot'), + 'hubot': Integration('hubot', 'hubot', doc='zerver/integrations/hubot.html'), 'jenkins': Integration('jenkins', 'jenkins', secondary_line_text='(or Hudson)'), 'jira-plugin': Integration( 'jira-plugin',