debian-mirror-gitlab/app/models/hooks/service_hook.rb
2020-01-01 13:55:28 +05:30

15 lines
341 B
Ruby

# frozen_string_literal: true
class ServiceHook < WebHook
include Presentable
belongs_to :service
validates :service, presence: true
# rubocop: disable CodeReuse/ServiceClass
def execute(data, hook_name = 'service_hook')
WebHookService.new(self, data, hook_name).execute
end
# rubocop: enable CodeReuse/ServiceClass
end