2018-11-20 20:47:30 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-09-02 18:07:02 +05:30
|
|
|
class ServiceHook < WebHook
|
2020-01-01 13:55:28 +05:30
|
|
|
include Presentable
|
2022-03-02 08:16:31 +05:30
|
|
|
extend ::Gitlab::Utils::Override
|
2020-01-01 13:55:28 +05:30
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
belongs_to :integration, foreign_key: :service_id
|
|
|
|
validates :integration, presence: true
|
2015-09-11 14:41:01 +05:30
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
def execute(data, hook_name = 'service_hook')
|
2021-06-08 01:23:25 +05:30
|
|
|
super(data, hook_name)
|
2015-09-11 14:41:01 +05:30
|
|
|
end
|
2022-03-02 08:16:31 +05:30
|
|
|
|
|
|
|
override :parent
|
|
|
|
delegate :parent, to: :integration
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|