Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

integrations: Update instructions mentioning the INTEGRATIONS registry.

Niloth Pd846cc308d7c
diff --git a/docs/documentation/integrations.md b/docs/documentation/integrations.md
index c97006dcdbc..45541eea9d1 100644
--- a/docs/documentation/integrations.md
+++ b/docs/documentation/integrations.md
@@ -29,13 +29,14 @@ Typically, the documentation process involves the following steps:
See [Markdown macros](#markdown-macros) for further details.
- Make sure you've added your integration to `zerver/lib/integrations.py` in
- the `WEBHOOK_INTEGRATIONS` section (or `INTEGRATIONS` if not a
- webhook).
-
- This registry configures your integration to appear on the
- `/integrations` page, and makes it possible to automatically generate the
- screenshot of an example message, which is important for the screenshots
- to be updated as Zulip's design changes.
+ the relevant `*_INTEGRATIONS` list, such as the `WEBHOOK_INTEGRATIONS`
+ list for incoming webhook integrations.
+
+ These lists get aggregated into the `INTEGRATIONS` registry which
+ configures your integration to appear on the `/integrations` page, and
+ makes it possible to automatically generate the screenshot of an example
+ message, which is important so that these screenshots can be easily
+ updated as Zulip's design changes.
- You'll need to add an SVG graphic of your integration's logo under the
`static/images/integrations/logos/<name>.svg`, where `<name>` is the
diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py
index 81f1e79268c..f1d7b1a3fec 100644
--- a/zerver/lib/integrations.py
+++ b/zerver/lib/integrations.py
@@ -18,17 +18,17 @@ from zerver.lib.webhooks.common import PresetUrlOption, WebhookConfigOption, Web
from zerver.webhooks import fixtureless_integrations
"""This module declares all of the (documented) integrations available
-in the Zulip server. The Integration class is used as part of
-generating the documentation on the /integrations/ page, while the
-WebhookIntegration class is also used to generate the URLs in
-`zproject/urls.py` for webhook integrations.
+in the Zulip server.
-To add a new non-webhook integration, add code to the INTEGRATIONS
-dictionary below.
+The Integration class is used as part of generating the
+documentation on the /integrations/ page, while the WebhookIntegration class
+is also used to generate the URLs in `zproject/urls.py` for webhook
+integrations.
-To add a new webhook integration, declare a WebhookIntegration in the
-WEBHOOK_INTEGRATIONS list below (it will be automatically added to
-INTEGRATIONS).
+To add a new integration, register it in the appropriate *_INTEGRATIONS
+list. For example, to add a new incoming webhook integration, declare a
+WebhookIntegration in the WEBHOOK_INTEGRATIONS list. All *_INTEGRATIONS
+lists are automatically aggregated into the INTEGRATIONS dict.
To add a new integration category, add to either the CATEGORIES or
META_CATEGORY dicts below. The META_CATEGORY dict is for categories