diff options
Diffstat (limited to 'app/models/project_services/webex_teams_service.rb')
-rw-r--r-- | app/models/project_services/webex_teams_service.rb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/app/models/project_services/webex_teams_service.rb b/app/models/project_services/webex_teams_service.rb index 4e8281f4e81..3d92d3bb85e 100644 --- a/app/models/project_services/webex_teams_service.rb +++ b/app/models/project_services/webex_teams_service.rb @@ -1,12 +1,14 @@ # frozen_string_literal: true class WebexTeamsService < ChatNotificationService + include ActionView::Helpers::UrlHelper + def title - 'Webex Teams' + s_("WebexTeamsService|Webex Teams") end def description - 'Receive event notifications in Webex Teams' + s_("WebexTeamsService|Send notifications about project events to Webex Teams.") end def self.to_param @@ -14,13 +16,8 @@ class WebexTeamsService < ChatNotificationService end def help - 'This service sends notifications about projects events to a Webex Teams conversation.<br /> - To set up this service: - <ol> - <li><a href="https://apphub.webex.com/teams/applications/incoming-webhooks-cisco-systems">Set up an incoming webhook for your conversation</a>. All notifications will come to this conversation.</li> - <li>Paste the <strong>Webhook URL</strong> into the field below.</li> - <li>Select events below to enable notifications.</li> - </ol>' + docs_link = link_to _('Learn more.'), Rails.application.routes.url_helpers.help_page_url('user/project/integrations/webex_teams'), target: '_blank', rel: 'noopener noreferrer' + s_("WebexTeamsService|Send notifications about project events to a Webex Teams conversation. %{docs_link}") % { docs_link: docs_link.html_safe } end def event_field(event) @@ -36,7 +33,7 @@ class WebexTeamsService < ChatNotificationService def default_fields [ - { type: 'text', name: 'webhook', placeholder: "e.g. https://api.ciscospark.com/v1/webhooks/incoming/…", required: true }, + { type: 'text', name: 'webhook', placeholder: "https://api.ciscospark.com/v1/webhooks/incoming/...", required: true }, { type: 'checkbox', name: 'notify_only_broken_pipelines' }, { type: 'select', name: 'branches_to_be_notified', choices: branch_choices } ] |