mirror of
https://github.com/zulip/zulip.git
synced 2025-10-28 10:33:54 +00:00
integrations: Add documentation for the event filtering system.
We create "event-filter-instruction.md" and add it to "create-bot-construct-url.md". This allows the user to keep track of the supported event types for most of the integrations that implement this feature. Note that not all integrations use "create-bot-construct-url.md". We also need to rename "function" to "view_function" to make this change type-check. This is relevant to #18392. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
committed by
Tim Abbott
parent
0cd76d17d7
commit
6b527dfa61
@@ -307,6 +307,11 @@ def integration_doc(request: HttpRequest, integration_name: str = REQ()) -> Http
|
||||
context["recommended_stream_name"] = integration.stream_name
|
||||
if isinstance(integration, WebhookIntegration):
|
||||
context["integration_url"] = integration.url[3:]
|
||||
if (
|
||||
hasattr(integration.function, "_all_event_types")
|
||||
and integration.function._all_event_types is not None
|
||||
):
|
||||
context["all_event_types"] = integration.function._all_event_types
|
||||
if isinstance(integration, HubotIntegration):
|
||||
context["hubot_docs_url"] = integration.hubot_docs_url
|
||||
|
||||
|
||||
Reference in New Issue
Block a user