mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
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>