diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-05 16:39:41 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-05 16:39:41 +0300 |
commit | 464b0de1acfc9383a551a05efa8c8a705c8bf70c (patch) | |
tree | 6766e8c53a968ed40cd71748c0e0b7d622f8c3df /app/models/concerns/triggerable_hooks.rb | |
parent | 97ee68b1750bade46ef6c1d7c813bc917a13d89d (diff) | |
parent | 9d742e61a79dcc85589598259e2fdac030b7ac00 (diff) |
Merge branch 'filter-web-hooks-by-branch' into 'master'
Filter web hooks by branch
See merge request gitlab-org/gitlab-ce!19513
Diffstat (limited to 'app/models/concerns/triggerable_hooks.rb')
-rw-r--r-- | app/models/concerns/triggerable_hooks.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/concerns/triggerable_hooks.rb b/app/models/concerns/triggerable_hooks.rb index 223a61119e5..c52baa0524c 100644 --- a/app/models/concerns/triggerable_hooks.rb +++ b/app/models/concerns/triggerable_hooks.rb @@ -29,6 +29,12 @@ module TriggerableHooks public_send(trigger) # rubocop:disable GitlabSecurity/PublicSend end + def select_active(hooks_scope, data) + select do |hook| + ActiveHookFilter.new(hook).matches?(hooks_scope, data) + end + end + private def triggerable_hooks(hooks) |