Commit 5a3d7651 authored by Marcel Amirault's avatar Marcel Amirault Committed by Dmytro Zaporozhets (DZ)

Update Discord integration UI text

parent ef278f6e
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
require "discordrb/webhooks" require "discordrb/webhooks"
class DiscordService < ChatNotificationService class DiscordService < ChatNotificationService
include ActionView::Helpers::UrlHelper
ATTACHMENT_REGEX = /: (?<entry>.*?)\n - (?<name>.*)\n*/.freeze ATTACHMENT_REGEX = /: (?<entry>.*?)\n - (?<name>.*)\n*/.freeze
def title def title
...@@ -10,7 +12,7 @@ class DiscordService < ChatNotificationService ...@@ -10,7 +12,7 @@ class DiscordService < ChatNotificationService
end end
def description def description
s_("DiscordService|Receive event notifications in Discord") s_("DiscordService|Send notifications about project events to a Discord channel.")
end end
def self.to_param def self.to_param
...@@ -18,13 +20,8 @@ class DiscordService < ChatNotificationService ...@@ -18,13 +20,8 @@ class DiscordService < ChatNotificationService
end end
def help def help
"This service sends notifications about project events to Discord channels.<br /> docs_link = link_to _('How do I set up this service?'), Rails.application.routes.url_helpers.help_page_url('user/project/integrations/discord_notifications'), target: '_blank', rel: 'noopener noreferrer'
To set up this service: s_('Send notifications about project events to a Discord channel. %{docs_link}').html_safe % { docs_link: docs_link.html_safe }
<ol>
<li><a href='https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks'>Setup a custom Incoming Webhook</a>.</li>
<li>Paste the <strong>Webhook URL</strong> into the field below.</li>
<li>Select events below to enable notifications.</li>
</ol>"
end end
def event_field(event) def event_field(event)
...@@ -36,13 +33,12 @@ class DiscordService < ChatNotificationService ...@@ -36,13 +33,12 @@ class DiscordService < ChatNotificationService
end end
def self.supported_events def self.supported_events
%w[push issue confidential_issue merge_request note confidential_note tag_push %w[push issue confidential_issue merge_request note confidential_note tag_push pipeline wiki_page]
pipeline wiki_page]
end end
def default_fields def default_fields
[ [
{ type: "text", name: "webhook", placeholder: "e.g. https://discordapp.com/api/webhooks/…" }, { type: "text", name: "webhook", placeholder: "https://discordapp.com/api/webhooks/…", help: "URL to the webhook for the Discord channel." },
{ type: "checkbox", name: "notify_only_broken_pipelines" }, { type: "checkbox", name: "notify_only_broken_pipelines" },
{ type: 'select', name: 'branches_to_be_notified', choices: branch_choices } { type: 'select', name: 'branches_to_be_notified', choices: branch_choices }
] ]
......
---
title: Update Discord integration UI text
merge_request: 58842
author:
type: other
...@@ -10,7 +10,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -10,7 +10,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w
The Discord Notifications service sends event notifications from GitLab to the channel for which the webhook was created. The Discord Notifications service sends event notifications from GitLab to the channel for which the webhook was created.
To send GitLab event notifications to a Discord channel, create a webhook in Discord and configure it in GitLab. To send GitLab event notifications to a Discord channel, [create a webhook in Discord](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
and configure it in GitLab.
## Create webhook ## Create webhook
......
...@@ -11077,7 +11077,7 @@ msgstr "" ...@@ -11077,7 +11077,7 @@ msgstr ""
msgid "DiscordService|Discord Notifications" msgid "DiscordService|Discord Notifications"
msgstr "" msgstr ""
msgid "DiscordService|Receive event notifications in Discord" msgid "DiscordService|Send notifications about project events to a Discord channel."
msgstr "" msgstr ""
msgid "Discover GitLab Geo" msgid "Discover GitLab Geo"
...@@ -15708,6 +15708,9 @@ msgstr "" ...@@ -15708,6 +15708,9 @@ msgstr ""
msgid "How do I mirror repositories?" msgid "How do I mirror repositories?"
msgstr "" msgstr ""
msgid "How do I set up this service?"
msgstr ""
msgid "How does cleanup work?" msgid "How does cleanup work?"
msgstr "" msgstr ""
...@@ -27947,6 +27950,9 @@ msgstr "" ...@@ -27947,6 +27950,9 @@ msgstr ""
msgid "Send notifications about project events to Mattermost channels. %{docs_link}" msgid "Send notifications about project events to Mattermost channels. %{docs_link}"
msgstr "" msgstr ""
msgid "Send notifications about project events to a Discord channel. %{docs_link}"
msgstr ""
msgid "Send report" msgid "Send report"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment