gitlab-org--gitlab-foss/app/models/hooks/service_hook.rb

13 lines
318 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2012-11-19 13:14:05 -05:00
class ServiceHook < WebHook
belongs_to :service
2017-07-20 11:12:06 -04:00
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
2012-11-19 13:14:05 -05:00
end