diff options
Diffstat (limited to 'app/models/integrations/telegram.rb')
-rw-r--r-- | app/models/integrations/telegram.rb | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/app/models/integrations/telegram.rb b/app/models/integrations/telegram.rb index 9af12c712c6..7c196720386 100644 --- a/app/models/integrations/telegram.rb +++ b/app/models/integrations/telegram.rb @@ -21,6 +21,11 @@ module Integrations placeholder: '@channelusername', required: true + field :notify_only_broken_pipelines, + type: :checkbox, + section: SECTION_TYPE_CONFIGURATION, + help: 'If selected, successful pipelines do not trigger a notification event.' + with_options if: :activated? do validates :token, :room, presence: true end @@ -51,34 +56,10 @@ module Integrations ) end - def fields - self.class.fields + build_event_channels - end - def self.supported_events super - ['deployment'] end - def sections - [ - { - type: SECTION_TYPE_CONNECTION, - title: s_('Integrations|Connection details'), - description: help - }, - { - type: SECTION_TYPE_TRIGGER, - title: s_('Integrations|Trigger'), - description: s_('Integrations|An event will be triggered when one of the following items happen.') - }, - { - type: SECTION_TYPE_CONFIGURATION, - title: s_('Integrations|Notification settings'), - description: s_('Integrations|Configure the scope of notifications.') - } - ] - end - private def set_webhook |