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