summaryrefslogtreecommitdiff
path: root/app/models/hooks
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2017-05-05 14:11:28 +0200
committerGabriel Mazetto <brodock@gmail.com>2017-05-12 23:26:48 +0100
commit2e97db051ca52d464382df0c84562fbc5e67b956 (patch)
treedb050f0bb9cb9edb9031d62509ab9ef4278fbccf /app/models/hooks
parentf661980904f718440cc700b7d1f38ea8bf0e5480 (diff)
downloadgitlab-ce-2e97db051ca52d464382df0c84562fbc5e67b956.tar.gz
Make the new repository_update_events configurable in System Hooks UI
Diffstat (limited to 'app/models/hooks')
-rw-r--r--app/models/hooks/system_hook.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/hooks/system_hook.rb b/app/models/hooks/system_hook.rb
index f97debb7113..c645805c6da 100644
--- a/app/models/hooks/system_hook.rb
+++ b/app/models/hooks/system_hook.rb
@@ -1,6 +1,9 @@
class SystemHook < WebHook
scope :repository_update_hooks, -> { where(repository_update_events: true) }
+ default_value_for :push_events, false
+ default_value_for :repository_update_events, true
+
def async_execute(data, hook_name)
Sidekiq::Client.enqueue(SystemHookWorker, id, data, hook_name)
end