Commit 12353ea6 authored by James Edwards-Jones's avatar James Edwards-Jones

Integrations can override configurable triggers

Allows us to hide the Triggers checkboxes on the GithubService form
parent 785ee558
...@@ -130,6 +130,10 @@ class Service < ActiveRecord::Base ...@@ -130,6 +130,10 @@ class Service < ActiveRecord::Base
fields fields
end end
def configurable_events
self.class.supported_events
end
def supported_events def supported_events
self.class.supported_events self.class.supported_events
end end
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
.col-sm-10 .col-sm-10
= form.check_box :active, disabled: disable_fields_service?(@service) = form.check_box :active, disabled: disable_fields_service?(@service)
- if @service.supported_events.present? - if @service.configurable_events.present?
.form-group .form-group
= form.label :url, "Trigger", class: 'control-label' = form.label :url, "Trigger", class: 'control-label'
.col-sm-10 .col-sm-10
- @service.supported_events.each do |event| - @service.configurable_events.each do |event|
%div %div
= form.check_box service_event_field_name(event), class: 'pull-left' = form.check_box service_event_field_name(event), class: 'pull-left'
.prepend-left-20 .prepend-left-20
......
...@@ -38,6 +38,10 @@ class GithubService < Service ...@@ -38,6 +38,10 @@ class GithubService < Service
%w(pipeline) %w(pipeline)
end end
def configurable_events
[]
end
def can_test? def can_test?
project.pipelines.any? project.pipelines.any?
end end
......
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