Commit 06c9bf5c authored by Arturo Herrero's avatar Arturo Herrero Committed by Luke Duncalfe

Cleanup remaining HipchatService code

- Remove HipChat service and records 13.12
  https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59769
- Cleanup remaining HipchatService code 14.0 => We are here

https://gitlab.com/gitlab-org/gitlab/-/issues/27954
parent 2f6f9ef2
......@@ -66,7 +66,6 @@
"Grafana",
"Gzip",
"Helm",
"HipChat",
"ID",
"Ingress",
"jasmine-jquery",
......
......@@ -1655,7 +1655,6 @@ Gitlab/NamespacedClass:
- 'app/models/project_services/discord_service.rb'
- 'app/models/project_services/drone_ci_service.rb'
- 'app/models/project_services/hangouts_chat_service.rb'
- 'app/models/project_services/hipchat_service.rb'
- 'app/models/project_services/issue_tracker_data.rb'
- 'app/models/project_services/jenkins_service.rb'
- 'app/models/project_services/jira_tracker_data.rb'
......
......@@ -1406,9 +1406,9 @@ class Project < ApplicationRecord
end
def disabled_services
return %w[datadog hipchat] unless Feature.enabled?(:datadog_ci_integration, self)
return %w[datadog] unless Feature.enabled?(:datadog_ci_integration, self)
%w[hipchat]
[]
end
def find_or_initialize_service(name)
......
# frozen_string_literal: true
# This service is scheduled for removal. All records must
# be deleted before the class can be removed.
# https://gitlab.com/gitlab-org/gitlab/-/issues/27954
class HipchatService < Integration
before_save :prevent_save
def self.to_param
'hipchat'
end
def self.supported_events
[]
end
def execute(data)
# We removed the hipchat gem due to https://gitlab.com/gitlab-org/gitlab/-/issues/325851#note_537143149
# HipChat is unusable anyway, so do nothing in this method
end
private
def prevent_save
errors.add(:base, _('HipChat endpoint is deprecated and should not be created or modified.'))
# 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
---
redirect_to: 'index.md'
remove_date: '2021-06-30'
---
This document was moved to [another location](index.md).
<!-- This redirect file can be deleted after 2021-06-30. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->
......@@ -16440,9 +16440,6 @@ msgstr ""
msgid "HighlightBar|Time to SLA:"
msgstr ""
msgid "HipChat endpoint is deprecated and should not be created or modified."
msgstr ""
msgid "History"
msgstr ""
......
# frozen_string_literal: true
require 'spec_helper'
# HipchatService is partially removed and it will be remove completely
# after the deletion of all the database records.
# https://gitlab.com/gitlab-org/gitlab/-/issues/27954
RSpec.describe HipchatService do
let_it_be(:project) { create(:project) }
subject(:service) { described_class.new(project: project) }
it { is_expected.to be_valid }
describe '#to_param' do
subject { service.to_param }
it { is_expected.to eq('hipchat') }
end
describe '#supported_events' do
subject { service.supported_events }
it { is_expected.to be_empty }
end
describe '#save' do
it 'prevents records from being created or updated' do
expect(service.save).to be_falsey
expect(service.errors.full_messages).to include(
'HipChat endpoint is deprecated and should not be created or modified.'
)
end
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