Skip to content
代码片段 群组 项目
提交 1e99bc6d 编辑于 作者: Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
浏览文件

Merge branch 'bmarjanovic/static-integration-dsl-app-models-integrations-pumble' into 'master'

Convert Pumble integration to use DSL

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127397



Merged-by: default avatarDouglas Barbosa Alexandre <dbalexandre@gmail.com>
Approved-by: default avatarDouglas Barbosa Alexandre <dbalexandre@gmail.com>
Approved-by: default avatarMichael Becker <11881043-wandering_person@users.noreply.gitlab.com>
Reviewed-by: default avatarBojan Marjanovic <bmarjanovic@gitlab.com>
Reviewed-by: default avatarMichael Becker <11881043-wandering_person@users.noreply.gitlab.com>
Co-authored-by: default avatarbmarjanovic <bmarjanovic@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -2,6 +2,24 @@
module Integrations
class Pumble < BaseChatNotification
undef :notify_only_broken_pipelines
field :webhook,
section: SECTION_TYPE_CONNECTION,
help: 'https://api.pumble.com/workspaces/x/...',
required: true
field :notify_only_broken_pipelines,
type: 'checkbox',
section: SECTION_TYPE_CONFIGURATION,
help: 'If selected, successful pipelines do not trigger a notification event.'
field :branches_to_be_notified,
type: 'select',
section: SECTION_TYPE_CONFIGURATION,
title: -> { s_('Integrations|Branches for which notifications are to be sent') },
choices: -> { branch_choices }
def title
'Pumble'
end
......@@ -34,17 +52,8 @@ def self.supported_events
pipeline wiki_page]
end
def default_fields
[
{ type: 'text', name: 'webhook', help: 'https://api.pumble.com/workspaces/x/...', required: true },
{ type: 'checkbox', name: 'notify_only_broken_pipelines' },
{
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: self.class.branch_choices
}
]
def fields
self.class.fields + build_event_channels
end
private
......
......@@ -2,7 +2,7 @@
require "spec_helper"
RSpec.describe Integrations::Pumble do
RSpec.describe Integrations::Pumble, feature_category: :integrations do
it_behaves_like "chat integration", "Pumble" do
let(:client_arguments) { webhook_url }
let(:payload) do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册