From 8fbd8c68f472d86a94a0cd4a659af1d106f19425 Mon Sep 17 00:00:00 2001 From: Eeshan Garg Date: Sat, 17 Mar 2018 16:17:53 -0230 Subject: [PATCH] webhooks: Update macros to specify custom topics and default PMs. These changes are the result of migrating to check_send_webhook_message. --- .../help/include/create-bot-construct-url-indented.md | 6 +++++- templates/zerver/help/include/create-bot-construct-url.md | 6 +++++- zerver/webhooks/appfollow/doc.md | 1 - zerver/webhooks/dropbox/doc.md | 1 - zerver/webhooks/gitlab/doc.md | 2 -- zerver/webhooks/gosquared/doc.md | 1 - zerver/webhooks/hellosign/doc.md | 1 - zerver/webhooks/insping/doc.md | 2 -- zerver/webhooks/librato/doc.md | 2 -- zerver/webhooks/raygun/doc.md | 4 +--- zerver/webhooks/splunk/doc.md | 2 -- zerver/webhooks/stripe/doc.md | 2 -- zerver/webhooks/taiga/doc.md | 1 - zerver/webhooks/wordpress/doc.md | 2 -- 14 files changed, 11 insertions(+), 22 deletions(-) diff --git a/templates/zerver/help/include/create-bot-construct-url-indented.md b/templates/zerver/help/include/create-bot-construct-url-indented.md index 91111f3e1c..f959a57b50 100644 --- a/templates/zerver/help/include/create-bot-construct-url-indented.md +++ b/templates/zerver/help/include/create-bot-construct-url-indented.md @@ -7,4 +7,8 @@ Modify the parameters of the URL above, where `api_key` is the API key of your Zulip bot, and `stream` is the stream name you want the - notifications sent to. + notifications sent to. If you do not specify a `stream`, the bot will + send notifications via PMs to the creator of the bot. + + To change the topic used by the bot, simply append `&topic=name` + to the end of the above URL, where `name` is your topic. diff --git a/templates/zerver/help/include/create-bot-construct-url.md b/templates/zerver/help/include/create-bot-construct-url.md index 4af743ad23..7e681bb799 100644 --- a/templates/zerver/help/include/create-bot-construct-url.md +++ b/templates/zerver/help/include/create-bot-construct-url.md @@ -7,4 +7,8 @@ bot using the bot's API key and the desired stream name: Modify the parameters of the URL above, where `api_key` is the API key of your Zulip bot, and `stream` is the stream name you want the -notifications sent to. +notifications sent to. If you do not specify a `stream`, the bot will +send notifications via PMs to the creator of the bot. + +To change the topic used by the bot, simply append `&topic=name` +to the end of the above URL, where `name` is your topic. diff --git a/zerver/webhooks/appfollow/doc.md b/zerver/webhooks/appfollow/doc.md index 902928673a..759226ceb5 100644 --- a/zerver/webhooks/appfollow/doc.md +++ b/zerver/webhooks/appfollow/doc.md @@ -4,7 +4,6 @@ using the Zulip AppFollow integration! 1. {!create-stream.md!} 1. {!create-bot-construct-url-indented.md!} - {!append-topic.md!} 1. Click on the app for which you'd like to receive reviews. Click on **Integrations** and go to the **Others** tab. diff --git a/zerver/webhooks/dropbox/doc.md b/zerver/webhooks/dropbox/doc.md index 5961e8bc59..b592c741e6 100644 --- a/zerver/webhooks/dropbox/doc.md +++ b/zerver/webhooks/dropbox/doc.md @@ -3,7 +3,6 @@ Get Dropbox notifications in Zulip! 1. {!create-stream.md!} 1. {!create-bot-construct-url-indented.md!} - {!append-topic.md!} 1. Go to your [Dropbox apps page](https://www.dropbox.com/developers/apps). Click on **Create app** near the top-right corner, and follow the on-screen diff --git a/zerver/webhooks/gitlab/doc.md b/zerver/webhooks/gitlab/doc.md index 6407265f45..2e4ef84d7c 100644 --- a/zerver/webhooks/gitlab/doc.md +++ b/zerver/webhooks/gitlab/doc.md @@ -6,8 +6,6 @@ Receive GitLab notifications in Zulip! {!git-webhook-url-with-branches-indented.md!} - {!append-topic.md!} - 1. Go to your repository on GitLab and click **Settings** on the left sidebar. Click on **Integrations**. diff --git a/zerver/webhooks/gosquared/doc.md b/zerver/webhooks/gosquared/doc.md index 201810a650..f88425b14a 100644 --- a/zerver/webhooks/gosquared/doc.md +++ b/zerver/webhooks/gosquared/doc.md @@ -3,7 +3,6 @@ Receive GoSquared notifications in Zulip! 1. {!create-stream.md!} 1. {!create-bot-construct-url-indented.md!} - {!append-topic.md!} 1. Go to your project's **Settings** and click on **Services**. Scroll down and next to **Webhook**, click on **Connect**. Click diff --git a/zerver/webhooks/hellosign/doc.md b/zerver/webhooks/hellosign/doc.md index 54ff047956..7e6ebca2a6 100644 --- a/zerver/webhooks/hellosign/doc.md +++ b/zerver/webhooks/hellosign/doc.md @@ -3,7 +3,6 @@ Configuring the HelloSign integration is easy! 1. {!create-stream.md!} 1. {!create-bot-construct-url-indented.md!} - {!append-topic.md!} 1. Go to your HelloSign account **Settings**. Select **Integrations** and click on **API**. diff --git a/zerver/webhooks/insping/doc.md b/zerver/webhooks/insping/doc.md index 9959977dea..8cdd8729fb 100644 --- a/zerver/webhooks/insping/doc.md +++ b/zerver/webhooks/insping/doc.md @@ -6,8 +6,6 @@ a website or service is up and running or down. 1. {!create-bot-construct-url-indented.md!} - {!append-topic.md!} - 1. On your Insping **Dashboard**, click on **Integrations**. Click on **Create Webhook**. diff --git a/zerver/webhooks/librato/doc.md b/zerver/webhooks/librato/doc.md index 554877a31f..fc744960cb 100644 --- a/zerver/webhooks/librato/doc.md +++ b/zerver/webhooks/librato/doc.md @@ -4,8 +4,6 @@ Get Zulip notifications for your Librato alerts or snapshots! {!create-bot-construct-url.md!} -{!append-topic.md!} - The default stream name is **librato** and default topic name is **Alert alert_name**. diff --git a/zerver/webhooks/raygun/doc.md b/zerver/webhooks/raygun/doc.md index a1cd5f81e9..36b0bea166 100644 --- a/zerver/webhooks/raygun/doc.md +++ b/zerver/webhooks/raygun/doc.md @@ -5,15 +5,13 @@ Follow these steps to integrate your Raygun application with Zulip: {!create-bot-construct-url.md!} -{!append-topic.md!} - Copy the URL and do the following steps: 1. Go to your [Raygun dashboard](https://app.raygun.com/dashboard/) and select your application (top left): ![](/static/images/integrations/raygun/001.png) -2. Click on **Integrations** on the left sidebar: +2. Click on **Integrations** on the left sidebar: ![](/static/images/integrations/raygun/002.png) 3. Click on **Webhook**: diff --git a/zerver/webhooks/splunk/doc.md b/zerver/webhooks/splunk/doc.md index 0216fb9058..b4d11f302d 100644 --- a/zerver/webhooks/splunk/doc.md +++ b/zerver/webhooks/splunk/doc.md @@ -4,8 +4,6 @@ See your Splunk Search alerts in Zulip! {!create-bot-construct-url.md!} -{!append-topic.md!} - Next, in the Splunk search app, execute the search you'd like to be alerted on and then save it as an alert: diff --git a/zerver/webhooks/stripe/doc.md b/zerver/webhooks/stripe/doc.md index 6f214b6bd6..247e1b4678 100644 --- a/zerver/webhooks/stripe/doc.md +++ b/zerver/webhooks/stripe/doc.md @@ -10,8 +10,6 @@ Add a webhook to your Stripe account by going to **Your account** > {!webhook-url-with-bot-email.md!} -{!append-topic.md!} - {!append-stream-name.md!} {% if 'http:' in external_uri_scheme %} diff --git a/zerver/webhooks/taiga/doc.md b/zerver/webhooks/taiga/doc.md index 7b62aa03af..c8121ea920 100644 --- a/zerver/webhooks/taiga/doc.md +++ b/zerver/webhooks/taiga/doc.md @@ -3,7 +3,6 @@ Receive Zulip notifications for your Taiga projects! 1. {!create-stream.md!} 1. {!create-bot-construct-url-indented.md!} - {!append-topic.md!} Make sure to specify the topic in the URL above. Otherwise, the default topic `General` will be used. diff --git a/zerver/webhooks/wordpress/doc.md b/zerver/webhooks/wordpress/doc.md index dc98311d21..4cb5833809 100644 --- a/zerver/webhooks/wordpress/doc.md +++ b/zerver/webhooks/wordpress/doc.md @@ -17,8 +17,6 @@ bottom of this page. {!create-bot-construct-url.md!} -{!append-topic.md!} - ***Important:** the HookPress plugin requires URL parameters to be delimited by semicolons instead of ampersands. If you have a self-installed blog, separate parameters with `;` instead of `&`.*