diff options
Diffstat (limited to 'lib/tasks/gitlab/web_hook.rake')
-rw-r--r-- | lib/tasks/gitlab/web_hook.rake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/web_hook.rake b/lib/tasks/gitlab/web_hook.rake index 0b98755a77c..b242329d720 100644 --- a/lib/tasks/gitlab/web_hook.rake +++ b/lib/tasks/gitlab/web_hook.rake @@ -37,7 +37,10 @@ namespace :gitlab do web_hooks.find_each do |hook| next unless hook.url == web_hook_url - hook.destroy! + result = WebHooks::DestroyService.new(nil).sync_destroy(hook) + + raise "Unable to destroy Web hook" unless result[:status] == :success + count += 1 end |