diff options
Diffstat (limited to 'app/models/project_services/alerts_service.rb')
-rw-r--r-- | app/models/project_services/alerts_service.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/app/models/project_services/alerts_service.rb b/app/models/project_services/alerts_service.rb deleted file mode 100644 index 4afce0dfe95..00000000000 --- a/app/models/project_services/alerts_service.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# This service is scheduled for removal. All records must -# be deleted before the class can be removed. -# https://gitlab.com/groups/gitlab-org/-/epics/5056 -class AlertsService < Service - before_save :prevent_save - - def self.to_param - 'alerts' - end - - def self.supported_events - %w() - end - - private - - def prevent_save - errors.add(:base, _('Alerts endpoint is deprecated and should not be created or modified. Use HTTP Integrations instead.')) - log_error('Prevented attempt to save or update deprecated AlertsService') - - # Stops execution of callbacks and database operation while - # preserving expectations of #save (will not raise) & #save! (raises) - # https://guides.rubyonrails.org/active_record_callbacks.html#halting-execution - throw :abort # rubocop:disable Cop/BanCatchThrow - end -end |