From b161b845a64c0c65deeb8f3d90ba24e599abbad8 Mon Sep 17 00:00:00 2001 From: Pedro Moreira da Silva Date: Fri, 10 Feb 2017 15:26:28 +0000 Subject: Add clearer placeholders and channel definition. --- app/models/project_services/mattermost_service.rb | 14 +++++++------- app/models/project_services/slack_service.rb | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/models/project_services/mattermost_service.rb b/app/models/project_services/mattermost_service.rb index 4ebc5318da1..c13538e9fea 100644 --- a/app/models/project_services/mattermost_service.rb +++ b/app/models/project_services/mattermost_service.rb @@ -15,10 +15,10 @@ class MattermostService < ChatNotificationService 'This service sends notifications about projects events to Mattermost channels.
To set up this service:
    -
  1. Enable incoming webhooks in your Mattermost installation.
  2. -
  3. Add an incoming webhook in your Mattermost team. The default channel can be overridden for each event.
  4. -
  5. Paste the webhook URL into the field bellow.
  6. -
  7. Select events below to enable notifications. The channel and username are optional.
  8. +
  9. Enable incoming webhooks in your Mattermost installation.
  10. +
  11. Add an incoming webhook in your Mattermost team. The default channel can be overridden for each event.
  12. +
  13. Paste the webhook URL into the field below.
  14. +
  15. Select events below to enable notifications. The Channel handle and Username fields are optional.
' end @@ -28,14 +28,14 @@ class MattermostService < ChatNotificationService def default_fields [ - { type: 'text', name: 'webhook', placeholder: 'http://mattermost_host/hooks/...' }, - { type: 'text', name: 'username', placeholder: 'username' }, + { type: 'text', name: 'webhook', placeholder: 'e.g. http://mattermost_host/hooks/…' }, + { type: 'text', name: 'username', placeholder: 'e.g. GitLab' }, { type: 'checkbox', name: 'notify_only_broken_builds' }, { type: 'checkbox', name: 'notify_only_broken_pipelines' }, ] end def default_channel_placeholder - "town-square" + "Channel handle (e.g. town-square)" end end diff --git a/app/models/project_services/slack_service.rb b/app/models/project_services/slack_service.rb index f77d2d7c60b..da7496573ef 100644 --- a/app/models/project_services/slack_service.rb +++ b/app/models/project_services/slack_service.rb @@ -13,11 +13,11 @@ class SlackService < ChatNotificationService def help 'This service sends notifications about projects events to Slack channels.
- To setup this service: + To set up this service:
    -
  1. Add an incoming webhook in your Slack team. The default channel can be overridden for each event.
  2. -
  3. Paste the Webhook URL into the field below.
  4. -
  5. Select events below to enable notifications. The channel and username are optional.
  6. +
  7. Add an incoming webhook in your Slack team. The default channel can be overridden for each event.
  8. +
  9. Paste the Webhook URL into the field below.
  10. +
  11. Select events below to enable notifications. The Channel name and Username fields are optional.
' end @@ -27,14 +27,14 @@ class SlackService < ChatNotificationService def default_fields [ - { type: 'text', name: 'webhook', placeholder: 'https://hooks.slack.com/services/...' }, - { type: 'text', name: 'username', placeholder: 'username' }, + { type: 'text', name: 'webhook', placeholder: 'e.g. https://hooks.slack.com/services/…' }, + { type: 'text', name: 'username', placeholder: 'e.g. GitLab' }, { type: 'checkbox', name: 'notify_only_broken_builds' }, { type: 'checkbox', name: 'notify_only_broken_pipelines' }, ] end def default_channel_placeholder - "#general" + "Channel name (e.g. general)" end end -- cgit v1.2.1 From 68bad19c74a0b07280bdcfdb5491eba0983bcf60 Mon Sep 17 00:00:00 2001 From: Pedro Moreira da Silva Date: Fri, 10 Feb 2017 15:49:52 +0000 Subject: Update docs on Mattermost and Slack notifications channels --- .../integrations/img/mattermost_configuration.png | Bin 73502 -> 249592 bytes .../integrations/img/slack_configuration.png | Bin 29825 -> 229050 bytes doc/user/project/integrations/mattermost.md | 11 ++++++----- doc/user/project/integrations/slack.md | 10 ++++++---- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/doc/user/project/integrations/img/mattermost_configuration.png b/doc/user/project/integrations/img/mattermost_configuration.png index 3c5ff5ee317..f52acf4ef3b 100644 Binary files a/doc/user/project/integrations/img/mattermost_configuration.png and b/doc/user/project/integrations/img/mattermost_configuration.png differ diff --git a/doc/user/project/integrations/img/slack_configuration.png b/doc/user/project/integrations/img/slack_configuration.png index fc8e58e686b..527824fc3eb 100644 Binary files a/doc/user/project/integrations/img/slack_configuration.png and b/doc/user/project/integrations/img/slack_configuration.png differ diff --git a/doc/user/project/integrations/mattermost.md b/doc/user/project/integrations/mattermost.md index 09ba9994d3a..cfb0931273d 100644 --- a/doc/user/project/integrations/mattermost.md +++ b/doc/user/project/integrations/mattermost.md @@ -24,23 +24,24 @@ There, you will see a checkbox with the following events that can be triggered: - Push - Issue +- Confidential issue - Merge request - Note - Tag push - Build +- Pipeline - Wiki page -Bellow each of these event checkboxes, you will have an input field to insert -which Mattermost channel you want to send that event message, with `#town-square` -being the default. The hash sign is optional. +Below each of these event checkboxes, you have an input field to enter +which Mattermost channel you want to send that event message. Enter your preferred channel handle (the hash sign `#` is optional). At the end, fill in your Mattermost details: | Field | Description | | ----- | ----------- | -| **Webhook** | The incoming webhooks which you have to setup on Mattermost, it will be something like: http://mattermost.example/hooks/5xo... | +| **Webhook** | The incoming webhook URL which you have to setup on Mattermost, it will be something like: http://mattermost.example/hooks/5xo… | | **Username** | Optional username which can be on messages sent to Mattermost. Fill this in if you want to change the username of the bot. | | **Notify only broken builds** | If you choose to enable the **Build** event and you want to be only notified about failed builds. | - +| **Notify only broken pipelines** | If you choose to enable the **Pipeline** event and you want to be only notified about failed pipelines. | ![Mattermost configuration](img/mattermost_configuration.png) diff --git a/doc/user/project/integrations/slack.md b/doc/user/project/integrations/slack.md index 57a9492044b..f27f9a726fc 100644 --- a/doc/user/project/integrations/slack.md +++ b/doc/user/project/integrations/slack.md @@ -21,23 +21,25 @@ There, you will see a checkbox with the following events that can be triggered: - Push - Issue +- Confidential issue - Merge request - Note - Tag push - Build +- Pipeline - Wiki page -Bellow each of these event checkboxes, you will have an input field to insert -which Slack channel you want to send that event message, with `#general` -being the default. Enter your preferred channel **without** the hash sign (`#`). +Below each of these event checkboxes, you have an input field to enter +which Slack channel you want to send that event message. Enter your preferred channel name **without** the hash sign (`#`). At the end, fill in your Slack details: | Field | Description | | ----- | ----------- | | **Webhook** | The [incoming webhook URL][slackhook] which you have to setup on Slack. | -| **Username** | Optional username which can be on messages sent to slack. Fill this in if you want to change the username of the bot. | +| **Username** | Optional username which can be on messages sent to Slack. Fill this in if you want to change the username of the bot. | | **Notify only broken builds** | If you choose to enable the **Build** event and you want to be only notified about failed builds. | +| **Notify only broken pipelines** | If you choose to enable the **Pipeline** event and you want to be only notified about failed pipelines. | After you are all done, click **Save changes** for the changes to take effect. -- cgit v1.2.1