Commit 7f3ff241 authored by Robert Speicher's avatar Robert Speicher

Add TriggerableHooks to GroupHook

parent 58e326b4
class GroupHook < ProjectHook
include CustomModelNaming
include TriggerableHooks
self.singular_route_key = :hook
triggerable_hooks [
:push_hooks,
:tag_push_hooks,
:issue_hooks,
:confidential_issue_hooks,
:note_hooks,
:merge_request_hooks,
:job_hooks,
:pipeline_hooks,
:wiki_page_hooks
]
belongs_to :group
clear_validators!
......
......@@ -3,9 +3,9 @@
.col-md-8.col-lg-7
%strong.light-header= hook.url
%div
- %w(push_events tag_push_events issues_events note_events merge_requests_events job_events wiki_page_events).each do |trigger|
- if hook.send(trigger)
%span.label.label-gray.deploy-project-label= trigger.titleize
- GroupHook.triggers.each_value do |trigger|
- if hook.public_send(trigger)
%span.label.label-gray.deploy-project-label= trigger.to_s.titleize
.col-md-4.col-lg-5.text-right-lg.prepend-top-5
%span.append-right-10.inline
SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment