summaryrefslogtreecommitdiff
path: root/app/models/integrations/confluence.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /app/models/integrations/confluence.rb
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
downloadgitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/models/integrations/confluence.rb')
-rw-r--r--app/models/integrations/confluence.rb15
1 files changed, 1 insertions, 14 deletions
diff --git a/app/models/integrations/confluence.rb b/app/models/integrations/confluence.rb
index 65adce7a8d6..4e1d1993d02 100644
--- a/app/models/integrations/confluence.rb
+++ b/app/models/integrations/confluence.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module Integrations
- class Confluence < Integration
+ class Confluence < BaseThirdPartyWiki
VALID_SCHEME_MATCH = %r{\Ahttps?\Z}.freeze
VALID_HOST_MATCH = %r{\A.+\.atlassian\.net\Z}.freeze
VALID_PATH_MATCH = %r{\A/wiki(/|\Z)}.freeze
@@ -11,16 +11,10 @@ module Integrations
validates :confluence_url, presence: true, if: :activated?
validate :validate_confluence_url_is_cloud, if: :activated?
- after_commit :cache_project_has_confluence
-
def self.to_param
'confluence'
end
- def self.supported_events
- %w()
- end
-
def title
s_('ConfluenceService|Confluence Workspace')
end
@@ -80,12 +74,5 @@ module Integrations
rescue URI::InvalidURIError
false
end
-
- def cache_project_has_confluence
- return unless project && !project.destroyed?
-
- project.project_setting.save! unless project.project_setting.persisted?
- project.project_setting.update_column(:has_confluence, active?)
- end
end
end