gitlab-org--gitlab-foss/app/observers/system_hook_observer.rb

18 lines
341 B
Ruby
Raw Normal View History

class SystemHookObserver < BaseObserver
observe :user, :project, :users_project
2013-02-20 04:15:56 -05:00
def after_create(model)
system_hook_service.execute_hooks_for(model, :create)
end
def after_destroy(model)
system_hook_service.execute_hooks_for(model, :destroy)
end
private
def system_hook_service
SystemHooksService.new
end
end