Skip to content
Snippets Groups Projects
Verified Commit 963b4ff8 authored by Bojan Marjanovic's avatar Bojan Marjanovic :five:
Browse files

Convert Webex integration to use api fields

parent a71aa143
No related branches found
No related tags found
1 merge request!148304Convert Webex integration to use api fields
......@@ -5,16 +5,19 @@ class WebexTeams < BaseChatNotification
field :webhook,
section: SECTION_TYPE_CONNECTION,
help: 'https://api.ciscospark.com/v1/webhooks/incoming/...',
description: 'The Webex Teams webhook. For example, https://api.ciscospark.com/v1/webhooks/incoming/...',
required: true
field :notify_only_broken_pipelines,
type: :checkbox,
section: SECTION_TYPE_CONFIGURATION
section: SECTION_TYPE_CONFIGURATION,
description: -> { _('Send notifications for broken pipelines.') }
field :branches_to_be_notified,
type: :select,
section: SECTION_TYPE_CONFIGURATION,
title: -> { s_('Integrations|Branches for which notifications are to be sent') },
description: -> { _('Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`.') },
choices: -> { branch_choices }
def self.title
......
......@@ -591,14 +591,7 @@ def self.integrations
desc: 'The Unify Circuit webhook. e.g. https://circuit.com/rest/v2/webhooks/incoming/…'
}
].flatten,
'webex-teams' => [
{
required: true,
name: :webhook,
type: String,
desc: 'The Webex Teams webhook. For example, https://api.ciscospark.com/v1/webhooks/incoming/...'
}
].flatten,
'webex-teams' => ::Integrations::WebexTeams.api_fields,
'zentao' => [
{
required: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment