This commit adds a "mapping" URL option preset that adds "Matching Zulip
channel" option to the stream dropdown widget. When that option is
chosen from the dropdown, it adds another parameter to the integration
URL -- "&mapping=channels".
This "mapping" parameter is meant to be used by integrations like Slack
to identify whether the user wants to map Slack channels to different
Zulip channels or different topics within a single channel.
This adds an icon for the `mapping`s' drop down option in the "Where to
send notification" drop down field.
Co-authored-by: Pieter CK <pieterceka123@gmail.com>
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
This adds `WebhookUrlOption.build_preset_config` method which builds
pre-configured WebhookUrlOptions objects. It can be used to abstract
commonly used WebhookUrlOption settings or to construct special
settings that have additional logic and UI in the web-app modal for
generating an incoming webhook URL.
Currently, one such setting is the "branches" url option. This setting
is meant to be used by "versioncontrol" integrations such as GitHub,
Gitea, etc. It adds UI that lets the user to choose which branches of
their repository can trigger notifications. So, we refactor those
integrations to use `build_preset_config` for the "branches" option.
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
Currently we have 2 implementations of `config_options`:
- It's used for generating optional webhook URL parameters. These
settings also come with custom UI in the "Generate integration URL"
modal.
- In `/bots` API, it's used as schema for the bots `BotConfigData`. Each
type of bots have different ways of defining their `BotConfigData`
fields. Currently, only embedded bots use `BotConfigData`, and only the
incoming webhooks use `config_options` to configure a bot's
`BotConfigData`; thus, the `config_options` remain unused.
To avoid confusion as to which implementation of `config_options` is
used by an integration, this separates the first use case -- to generate
optional webhook URL -- to a new field called `url_options`. Thus, the
`config_options` field is reserved only for the second use case.
- generate-integration-url.md has been long replaced by the
generate-webhook-url-basic.md.
- webhook-url.md was only being used inside the above macro.
Updates all the https://chat.zulip.org/#narrow/stream/ links in the
docs and comments to use the new /channel/ path. All these links are
for documentation/reference purposes only and thus, can be bulk-updated.
This commit is a part of the effort to rename stream to channel.
Updates `.md` files in api_docs/ to use "stream" instead of "channel"
for descriptive text, with the exception of the API changelog file.
Part of stream to channel rename project.
- Updates API docs that have numbered instructions to use the
`{start_tabs}` formatting we use in the help center.
- Cleans up formatting and revises documentation that shouldn't
be formatted as a numbered instructions block.
- Cross-links related articles.
Fixes#28876.
- Updates incoming webhooks overview and walkthrough to be consistent
with the `zerver/webhooks/` codebase.
- Tweaks the documentation for better readability.
Updates API and contributor documentation for writing integrations
for the new `generate-integration-url.md` macro. Removes all
refrences to `create-bot-construct-url.md`, which was removed in
the previous commit.
The python code snippet referred to exactly doesn't exists.
This commit changes it to the exact code present in
"zerver/lib/integrations.py", which has a type annotation.
- Updates `.prettierignore` for the new directory.
- Updates any reference to the API documentation directory for
markdown files to be `api_docs/` instead of `zerver/api/`.
- Removes a reference link from `docs/documentation/api.md` that
hasn't referenced anything in the text since commit 0542c60.
- Update rendering of API documentation for new directory.