2014-09-02 18:07:02 +05:30
|
|
|
class SystemHook < WebHook
|
2017-09-10 17:25:29 +05:30
|
|
|
TRIGGERS = {
|
|
|
|
repository_update_hooks: :repository_update_events,
|
|
|
|
push_hooks: :push_events,
|
|
|
|
tag_push_hooks: :tag_push_events
|
|
|
|
}.freeze
|
|
|
|
|
|
|
|
TRIGGERS.each do |trigger, event|
|
|
|
|
scope trigger, -> { where(event => true) }
|
2016-06-02 11:05:42 +05:30
|
|
|
end
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
default_value_for :push_events, false
|
|
|
|
default_value_for :repository_update_events, true
|
2014-09-02 18:07:02 +05:30
|
|
|
end
|