2018-07-25 05:30:33 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-05-22 09:58:44 -04:00
|
|
|
# To add new service you should build a class inherited from Service
|
|
|
|
# and implement a set of methods
|
2019-03-28 09:17:42 -04:00
|
|
|
class Service < ApplicationRecord
|
2015-02-05 17:20:55 -05:00
|
|
|
include Sortable
|
2018-01-25 10:21:23 -05:00
|
|
|
include Importable
|
2018-08-20 14:34:07 -04:00
|
|
|
include ProjectServicesLoggable
|
2019-05-22 11:47:42 -04:00
|
|
|
include DataFields
|
2018-01-25 10:21:23 -05:00
|
|
|
|
2017-07-03 10:01:41 -04:00
|
|
|
serialize :properties, JSON # rubocop:disable Cop/ActiveRecordSerialize
|
2014-09-07 20:54:18 -04:00
|
|
|
|
2014-02-26 03:41:44 -05:00
|
|
|
default_value_for :active, false
|
2015-02-19 00:02:57 -05:00
|
|
|
default_value_for :push_events, true
|
|
|
|
default_value_for :issues_events, true
|
2016-08-30 17:39:25 -04:00
|
|
|
default_value_for :confidential_issues_events, true
|
2016-11-14 16:30:01 -05:00
|
|
|
default_value_for :commit_events, true
|
2015-02-19 00:02:57 -05:00
|
|
|
default_value_for :merge_requests_events, true
|
|
|
|
default_value_for :tag_push_events, true
|
2015-03-05 13:38:23 -05:00
|
|
|
default_value_for :note_events, true
|
2018-04-03 07:00:33 -04:00
|
|
|
default_value_for :confidential_note_events, true
|
2017-05-15 11:11:45 -04:00
|
|
|
default_value_for :job_events, true
|
2016-09-09 08:32:06 -04:00
|
|
|
default_value_for :pipeline_events, true
|
2016-02-28 02:26:52 -05:00
|
|
|
default_value_for :wiki_page_events, true
|
2014-09-11 11:48:29 -04:00
|
|
|
|
|
|
|
after_initialize :initialize_properties
|
2014-02-26 03:41:44 -05:00
|
|
|
|
2015-10-15 03:09:01 -04:00
|
|
|
after_commit :reset_updated_properties
|
2016-06-03 04:21:18 -04:00
|
|
|
after_commit :cache_project_has_external_issue_tracker
|
2016-07-17 10:32:11 -04:00
|
|
|
after_commit :cache_project_has_external_wiki
|
2015-10-15 03:09:01 -04:00
|
|
|
|
2016-06-08 12:10:46 -04:00
|
|
|
belongs_to :project, inverse_of: :services
|
2012-11-19 13:14:05 -05:00
|
|
|
has_one :service_hook
|
|
|
|
|
2020-03-11 08:09:26 -04:00
|
|
|
validates :project_id, presence: true, unless: -> { template? || instance? }
|
2020-03-14 02:09:14 -04:00
|
|
|
validates :project_id, absence: true, if: -> { template? || instance? }
|
2020-03-18 17:09:22 -04:00
|
|
|
validates :type, uniqueness: { scope: :project_id }, unless: -> { template? || instance? }, on: :create
|
2017-04-25 11:47:57 -04:00
|
|
|
validates :type, presence: true
|
2020-03-05 10:07:52 -05:00
|
|
|
validates :template, uniqueness: { scope: :type }, if: -> { template? }
|
2020-03-11 08:09:26 -04:00
|
|
|
validates :instance, uniqueness: { scope: :type }, if: -> { instance? }
|
|
|
|
validate :validate_is_instance_or_template
|
2013-01-03 02:52:14 -05:00
|
|
|
|
2017-02-14 09:15:41 -05:00
|
|
|
scope :visible, -> { where.not(type: 'GitlabIssueTrackerService') }
|
2016-01-19 07:48:07 -05:00
|
|
|
scope :issue_trackers, -> { where(category: 'issue_tracker') }
|
2016-07-21 04:36:02 -04:00
|
|
|
scope :external_wikis, -> { where(type: 'ExternalWikiService').active }
|
2016-01-19 07:48:07 -05:00
|
|
|
scope :active, -> { where(active: true) }
|
|
|
|
scope :without_defaults, -> { where(default: false) }
|
2019-11-13 07:06:22 -05:00
|
|
|
scope :by_type, -> (type) { where(type: type) }
|
2020-03-24 14:07:55 -04:00
|
|
|
scope :templates, -> { where(template: true, type: available_services_types) }
|
2015-01-28 17:25:55 -05:00
|
|
|
|
2015-02-19 00:02:57 -05:00
|
|
|
scope :push_hooks, -> { where(push_events: true, active: true) }
|
|
|
|
scope :tag_push_hooks, -> { where(tag_push_events: true, active: true) }
|
|
|
|
scope :issue_hooks, -> { where(issues_events: true, active: true) }
|
2016-08-30 18:11:46 -04:00
|
|
|
scope :confidential_issue_hooks, -> { where(confidential_issues_events: true, active: true) }
|
2015-02-19 00:02:57 -05:00
|
|
|
scope :merge_request_hooks, -> { where(merge_requests_events: true, active: true) }
|
2015-03-05 13:38:23 -05:00
|
|
|
scope :note_hooks, -> { where(note_events: true, active: true) }
|
2018-04-03 07:00:33 -04:00
|
|
|
scope :confidential_note_hooks, -> { where(confidential_note_events: true, active: true) }
|
2017-05-15 11:11:45 -04:00
|
|
|
scope :job_hooks, -> { where(job_events: true, active: true) }
|
2016-08-02 06:06:31 -04:00
|
|
|
scope :pipeline_hooks, -> { where(pipeline_events: true, active: true) }
|
2016-02-28 02:26:52 -05:00
|
|
|
scope :wiki_page_hooks, -> { where(wiki_page_events: true, active: true) }
|
2019-04-26 17:08:41 -04:00
|
|
|
scope :deployment_hooks, -> { where(deployment_events: true, active: true) }
|
2016-06-03 04:21:18 -04:00
|
|
|
scope :external_issue_trackers, -> { issue_trackers.active.without_defaults }
|
2018-01-04 17:35:41 -05:00
|
|
|
scope :deployment, -> { where(category: 'deployment') }
|
2015-02-19 00:02:57 -05:00
|
|
|
|
2016-01-19 07:48:07 -05:00
|
|
|
default_value_for :category, 'common'
|
|
|
|
|
2013-01-03 02:52:14 -05:00
|
|
|
def activated?
|
|
|
|
active
|
|
|
|
end
|
2013-05-22 09:58:44 -04:00
|
|
|
|
2017-07-05 08:07:03 -04:00
|
|
|
def show_active_box?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
def editable?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
2014-05-28 04:35:43 -04:00
|
|
|
def category
|
2016-01-19 07:48:07 -05:00
|
|
|
read_attribute(:category).to_sym
|
2014-05-28 04:35:43 -04:00
|
|
|
end
|
|
|
|
|
2014-09-11 11:48:29 -04:00
|
|
|
def initialize_properties
|
|
|
|
self.properties = {} if properties.nil?
|
|
|
|
end
|
|
|
|
|
2013-05-22 09:58:44 -04:00
|
|
|
def title
|
2013-05-22 10:59:43 -04:00
|
|
|
# implement inside child
|
2013-05-22 09:58:44 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def description
|
2013-05-22 10:59:43 -04:00
|
|
|
# implement inside child
|
2013-05-22 09:58:44 -04:00
|
|
|
end
|
|
|
|
|
2014-05-28 04:35:43 -04:00
|
|
|
def help
|
|
|
|
# implement inside child
|
|
|
|
end
|
|
|
|
|
2013-05-22 09:58:44 -04:00
|
|
|
def to_param
|
2013-05-22 10:59:43 -04:00
|
|
|
# implement inside child
|
2016-12-27 07:44:24 -05:00
|
|
|
self.class.to_param
|
2013-05-22 09:58:44 -04:00
|
|
|
end
|
|
|
|
|
2017-01-12 17:33:04 -05:00
|
|
|
def self.to_param
|
|
|
|
raise NotImplementedError
|
|
|
|
end
|
|
|
|
|
2013-05-22 09:58:44 -04:00
|
|
|
def fields
|
2013-05-22 10:59:43 -04:00
|
|
|
# implement inside child
|
2013-05-22 09:58:44 -04:00
|
|
|
[]
|
|
|
|
end
|
2013-05-22 10:59:43 -04:00
|
|
|
|
2019-09-09 16:22:00 -04:00
|
|
|
# Expose a list of fields in the JSON endpoint.
|
|
|
|
#
|
|
|
|
# This list is used in `Service#as_json(only: json_fields)`.
|
|
|
|
def json_fields
|
|
|
|
%w(active)
|
|
|
|
end
|
|
|
|
|
2016-07-12 17:19:47 -04:00
|
|
|
def test_data(project, user)
|
2016-08-12 04:09:29 -04:00
|
|
|
Gitlab::DataBuilder::Push.build_sample(project, user)
|
2016-07-12 17:19:47 -04:00
|
|
|
end
|
|
|
|
|
2016-07-12 16:00:49 -04:00
|
|
|
def event_channel_names
|
|
|
|
[]
|
|
|
|
end
|
|
|
|
|
2016-08-02 06:06:31 -04:00
|
|
|
def event_names
|
2016-12-27 07:44:24 -05:00
|
|
|
self.class.event_names
|
2016-08-02 06:06:31 -04:00
|
|
|
end
|
|
|
|
|
2017-01-12 17:33:04 -05:00
|
|
|
def self.event_names
|
2019-06-16 11:57:38 -04:00
|
|
|
self.supported_events.map { |event| ServicesHelper.service_event_field_name(event) }
|
2017-01-12 17:33:04 -05:00
|
|
|
end
|
|
|
|
|
2016-07-13 15:49:47 -04:00
|
|
|
def event_field(event)
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
2018-01-06 01:18:13 -05:00
|
|
|
def api_field_names
|
|
|
|
fields.map { |field| field[:name] }
|
2019-06-26 10:03:57 -04:00
|
|
|
.reject { |field_name| field_name =~ /(password|token|key|title|description)/ }
|
2018-01-06 01:18:13 -05:00
|
|
|
end
|
|
|
|
|
2016-07-13 15:49:47 -04:00
|
|
|
def global_fields
|
|
|
|
fields
|
|
|
|
end
|
|
|
|
|
2018-03-06 18:20:01 -05:00
|
|
|
def configurable_events
|
|
|
|
events = self.class.supported_events
|
|
|
|
|
|
|
|
# No need to disable individual triggers when there is only one
|
|
|
|
if events.count == 1
|
|
|
|
[]
|
|
|
|
else
|
|
|
|
events
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2019-11-26 07:06:18 -05:00
|
|
|
def configurable_event_actions
|
|
|
|
self.class.supported_event_actions
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.supported_event_actions
|
|
|
|
%w()
|
|
|
|
end
|
|
|
|
|
2015-02-28 11:33:18 -05:00
|
|
|
def supported_events
|
2016-12-27 07:44:24 -05:00
|
|
|
self.class.supported_events
|
2015-02-28 11:33:18 -05:00
|
|
|
end
|
|
|
|
|
2017-01-12 17:33:04 -05:00
|
|
|
def self.supported_events
|
2019-06-16 11:57:38 -04:00
|
|
|
%w(commit push tag_push issue confidential_issue merge_request wiki_page)
|
2017-01-12 17:33:04 -05:00
|
|
|
end
|
|
|
|
|
2015-08-12 03:40:54 -04:00
|
|
|
def execute(data)
|
2013-05-22 10:59:43 -04:00
|
|
|
# implement inside child
|
|
|
|
end
|
2013-08-09 14:14:02 -04:00
|
|
|
|
2015-08-12 03:40:54 -04:00
|
|
|
def test(data)
|
|
|
|
# default implementation
|
|
|
|
result = execute(data)
|
|
|
|
{ success: result.present?, result: result }
|
|
|
|
end
|
|
|
|
|
2013-08-09 14:14:02 -04:00
|
|
|
def can_test?
|
2017-04-24 11:23:51 -04:00
|
|
|
true
|
2013-08-09 14:14:02 -04:00
|
|
|
end
|
2014-09-07 20:54:18 -04:00
|
|
|
|
|
|
|
# Provide convenient accessor methods
|
|
|
|
# for each serialized property.
|
2015-10-15 03:09:01 -04:00
|
|
|
# Also keep track of updated properties in a similar way as ActiveModel::Dirty
|
2014-09-07 20:54:18 -04:00
|
|
|
def self.prop_accessor(*args)
|
|
|
|
args.each do |arg|
|
2019-09-02 14:05:33 -04:00
|
|
|
class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
2018-04-03 07:00:33 -04:00
|
|
|
unless method_defined?(arg)
|
|
|
|
def #{arg}
|
|
|
|
properties['#{arg}']
|
|
|
|
end
|
2014-09-07 20:54:18 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def #{arg}=(value)
|
2016-10-04 04:01:32 -04:00
|
|
|
self.properties ||= {}
|
2015-10-15 03:09:01 -04:00
|
|
|
updated_properties['#{arg}'] = #{arg} unless #{arg}_changed?
|
2014-09-07 20:54:18 -04:00
|
|
|
self.properties['#{arg}'] = value
|
|
|
|
end
|
2015-10-15 03:09:01 -04:00
|
|
|
|
|
|
|
def #{arg}_changed?
|
|
|
|
#{arg}_touched? && #{arg} != #{arg}_was
|
|
|
|
end
|
|
|
|
|
|
|
|
def #{arg}_touched?
|
|
|
|
updated_properties.include?('#{arg}')
|
|
|
|
end
|
|
|
|
|
|
|
|
def #{arg}_was
|
|
|
|
updated_properties['#{arg}']
|
|
|
|
end
|
2019-09-02 14:05:33 -04:00
|
|
|
RUBY
|
2014-09-07 20:54:18 -04:00
|
|
|
end
|
|
|
|
end
|
2014-12-07 05:29:37 -05:00
|
|
|
|
2015-12-07 07:23:23 -05:00
|
|
|
# Provide convenient boolean accessor methods
|
|
|
|
# for each serialized property.
|
|
|
|
# Also keep track of updated properties in a similar way as ActiveModel::Dirty
|
|
|
|
def self.boolean_accessor(*args)
|
|
|
|
self.prop_accessor(*args)
|
|
|
|
|
|
|
|
args.each do |arg|
|
2019-09-02 14:05:33 -04:00
|
|
|
class_eval <<~RUBY, __FILE__, __LINE__ + 1
|
2015-12-11 12:01:57 -05:00
|
|
|
def #{arg}?
|
2018-05-29 08:46:42 -04:00
|
|
|
# '!!' is used because nil or empty string is converted to nil
|
2018-12-15 04:06:56 -05:00
|
|
|
!!ActiveRecord::Type::Boolean.new.cast(#{arg})
|
2015-12-11 12:01:57 -05:00
|
|
|
end
|
2019-09-02 14:05:33 -04:00
|
|
|
RUBY
|
2015-12-07 07:23:23 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-10-15 03:09:01 -04:00
|
|
|
# Returns a hash of the properties that have been assigned a new value since last save,
|
|
|
|
# indicating their original values (attr => original value).
|
2016-01-19 07:48:07 -05:00
|
|
|
# ActiveRecord does not provide a mechanism to track changes in serialized keys,
|
2015-10-15 03:09:01 -04:00
|
|
|
# so we need a specific implementation for service properties.
|
|
|
|
# This allows to track changes to properties set with the accessor methods,
|
|
|
|
# but not direct manipulation of properties hash.
|
|
|
|
def updated_properties
|
|
|
|
@updated_properties ||= ActiveSupport::HashWithIndifferentAccess.new
|
2015-10-09 06:20:38 -04:00
|
|
|
end
|
|
|
|
|
2015-10-15 03:09:01 -04:00
|
|
|
def reset_updated_properties
|
|
|
|
@updated_properties = nil
|
|
|
|
end
|
2016-01-19 07:48:07 -05:00
|
|
|
|
2014-12-07 05:29:37 -05:00
|
|
|
def async_execute(data)
|
2015-02-28 11:33:18 -05:00
|
|
|
return unless supported_events.include?(data[:object_kind])
|
2015-03-17 22:06:43 -04:00
|
|
|
|
2017-11-29 10:30:17 -05:00
|
|
|
ProjectServiceWorker.perform_async(id, data)
|
2014-12-07 05:29:37 -05:00
|
|
|
end
|
2015-01-23 14:55:41 -05:00
|
|
|
|
|
|
|
def issue_tracker?
|
|
|
|
self.category == :issue_tracker
|
|
|
|
end
|
|
|
|
|
2020-03-24 14:07:55 -04:00
|
|
|
# Find all service templates; if some of them do not exist, create them
|
|
|
|
# within a transaction to perform the lowest possible SQL queries.
|
|
|
|
def self.find_or_create_templates
|
|
|
|
create_nonexistent_templates
|
|
|
|
templates
|
|
|
|
end
|
|
|
|
|
|
|
|
private_class_method def self.create_nonexistent_templates
|
|
|
|
nonexistent_services = available_services_types - templates.map(&:type)
|
|
|
|
return if nonexistent_services.empty?
|
|
|
|
|
|
|
|
transaction do
|
|
|
|
nonexistent_services.each do |service_type|
|
|
|
|
service_type.constantize.create(template: true)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-02-12 12:19:55 -05:00
|
|
|
def self.available_services_names
|
2017-02-14 20:52:44 -05:00
|
|
|
service_names = %w[
|
2020-02-15 16:08:49 -05:00
|
|
|
alerts
|
2015-03-17 22:06:43 -04:00
|
|
|
asana
|
2015-04-09 16:37:07 -04:00
|
|
|
assembla
|
|
|
|
bamboo
|
2016-06-26 13:36:43 -04:00
|
|
|
bugzilla
|
2020-03-24 14:07:55 -04:00
|
|
|
buildkite
|
2015-04-09 16:37:07 -04:00
|
|
|
campfire
|
|
|
|
custom_issue_tracker
|
2018-10-30 07:23:20 -04:00
|
|
|
discord
|
2015-08-26 19:58:49 -04:00
|
|
|
drone_ci
|
2015-03-17 22:06:43 -04:00
|
|
|
emails_on_push
|
2015-04-09 16:37:07 -04:00
|
|
|
external_wiki
|
|
|
|
flowdock
|
2018-06-24 06:12:07 -04:00
|
|
|
hangouts_chat
|
2019-04-09 09:06:36 -04:00
|
|
|
hipchat
|
2015-04-09 16:37:07 -04:00
|
|
|
irker
|
2015-03-17 22:06:43 -04:00
|
|
|
jira
|
2016-12-20 16:29:39 -05:00
|
|
|
mattermost
|
2020-03-24 14:07:55 -04:00
|
|
|
mattermost_slash_commands
|
|
|
|
microsoft_teams
|
2017-09-21 16:05:44 -04:00
|
|
|
packagist
|
2016-11-17 06:06:45 -05:00
|
|
|
pipelines_email
|
2015-04-09 16:37:07 -04:00
|
|
|
pivotaltracker
|
2017-03-07 11:57:42 -05:00
|
|
|
prometheus
|
2015-04-09 16:37:07 -04:00
|
|
|
pushover
|
2015-03-17 22:06:43 -04:00
|
|
|
redmine
|
2016-12-20 16:14:33 -05:00
|
|
|
slack
|
2020-03-24 14:07:55 -04:00
|
|
|
slack_slash_commands
|
2015-04-09 16:37:07 -04:00
|
|
|
teamcity
|
2019-12-02 07:06:45 -05:00
|
|
|
unify_circuit
|
2020-03-24 14:07:55 -04:00
|
|
|
youtrack
|
2016-08-31 14:16:03 -04:00
|
|
|
]
|
2018-01-11 11:34:01 -05:00
|
|
|
|
2017-04-05 07:04:34 -04:00
|
|
|
if Rails.env.development?
|
|
|
|
service_names += %w[mock_ci mock_deployment mock_monitoring]
|
|
|
|
end
|
2017-02-14 20:52:44 -05:00
|
|
|
|
|
|
|
service_names.sort_by(&:downcase)
|
2015-02-12 12:19:55 -05:00
|
|
|
end
|
|
|
|
|
2020-03-24 14:07:55 -04:00
|
|
|
def self.available_services_types
|
|
|
|
available_services_names.map { |service_name| "#{service_name}_service".camelize }
|
|
|
|
end
|
|
|
|
|
2020-02-11 13:08:58 -05:00
|
|
|
def self.build_from_template(project_id, template)
|
|
|
|
service = template.dup
|
2019-10-01 08:05:59 -04:00
|
|
|
|
2020-02-11 13:08:58 -05:00
|
|
|
if template.supports_data_fields?
|
|
|
|
data_fields = template.data_fields.dup
|
2019-10-01 08:05:59 -04:00
|
|
|
data_fields.service = service
|
|
|
|
end
|
|
|
|
|
2020-02-11 13:08:58 -05:00
|
|
|
service.template = false
|
2015-02-11 20:34:41 -05:00
|
|
|
service.project_id = project_id
|
2018-07-05 05:43:48 -04:00
|
|
|
service.active = false if service.active? && !service.valid?
|
2016-11-16 06:46:07 -05:00
|
|
|
service
|
2015-01-23 14:55:41 -05:00
|
|
|
end
|
2016-06-03 04:21:18 -04:00
|
|
|
|
2018-01-04 04:33:51 -05:00
|
|
|
def deprecated?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def deprecation_message
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
2019-10-01 08:05:59 -04:00
|
|
|
# override if needed
|
|
|
|
def supports_data_fields?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
2016-06-03 04:21:18 -04:00
|
|
|
private
|
|
|
|
|
2020-03-11 08:09:26 -04:00
|
|
|
def validate_is_instance_or_template
|
|
|
|
errors.add(:template, 'The service should be a service template or instance-level integration') if template? && instance?
|
|
|
|
end
|
|
|
|
|
2016-06-03 04:21:18 -04:00
|
|
|
def cache_project_has_external_issue_tracker
|
|
|
|
if project && !project.destroyed?
|
|
|
|
project.cache_has_external_issue_tracker
|
|
|
|
end
|
|
|
|
end
|
2016-07-17 10:32:11 -04:00
|
|
|
|
|
|
|
def cache_project_has_external_wiki
|
|
|
|
if project && !project.destroyed?
|
|
|
|
project.cache_has_external_wiki
|
|
|
|
end
|
|
|
|
end
|
2018-01-26 08:48:47 -05:00
|
|
|
|
2018-03-16 15:09:35 -04:00
|
|
|
def self.event_description(event)
|
|
|
|
case event
|
|
|
|
when "push", "push_events"
|
|
|
|
"Event will be triggered by a push to the repository"
|
|
|
|
when "tag_push", "tag_push_events"
|
|
|
|
"Event will be triggered when a new tag is pushed to the repository"
|
|
|
|
when "note", "note_events"
|
|
|
|
"Event will be triggered when someone adds a comment"
|
|
|
|
when "issue", "issue_events"
|
|
|
|
"Event will be triggered when an issue is created/updated/closed"
|
|
|
|
when "confidential_issue", "confidential_issue_events"
|
|
|
|
"Event will be triggered when a confidential issue is created/updated/closed"
|
|
|
|
when "merge_request", "merge_request_events"
|
|
|
|
"Event will be triggered when a merge request is created/updated/merged"
|
|
|
|
when "pipeline", "pipeline_events"
|
|
|
|
"Event will be triggered when a pipeline status changes"
|
|
|
|
when "wiki_page", "wiki_page_events"
|
|
|
|
"Event will be triggered when a wiki page is created/updated"
|
|
|
|
when "commit", "commit_events"
|
|
|
|
"Event will be triggered when a commit is created/updated"
|
2019-04-26 17:08:41 -04:00
|
|
|
when "deployment"
|
|
|
|
"Event will be triggered when a deployment finishes"
|
2018-03-16 15:09:35 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-01-26 08:48:47 -05:00
|
|
|
def valid_recipients?
|
|
|
|
activated? && !importing?
|
|
|
|
end
|
2012-11-19 13:14:05 -05:00
|
|
|
end
|
2019-09-13 09:26:31 -04:00
|
|
|
|
|
|
|
Service.prepend_if_ee('EE::Service')
|