diff options
Diffstat (limited to 'lib/gitlab/gl_repository')
-rw-r--r-- | lib/gitlab/gl_repository/identifier.rb | 13 | ||||
-rw-r--r-- | lib/gitlab/gl_repository/repo_type.rb | 6 |
2 files changed, 9 insertions, 10 deletions
diff --git a/lib/gitlab/gl_repository/identifier.rb b/lib/gitlab/gl_repository/identifier.rb index 57350b1edb0..f521a14ea19 100644 --- a/lib/gitlab/gl_repository/identifier.rb +++ b/lib/gitlab/gl_repository/identifier.rb @@ -53,12 +53,13 @@ module Gitlab private def container_class - case @container_type - when 'project' - Project - when 'group' - Group - end + # NOTE: This is currently only used and supported for group wikis + # https://gitlab.com/gitlab-org/gitlab/-/issues/219192 + return unless @repo_type_name == 'wiki' + + "#{@container_type}_#{@repo_type_name}".classify.constantize + rescue NameError + nil end end diff --git a/lib/gitlab/gl_repository/repo_type.rb b/lib/gitlab/gl_repository/repo_type.rb index 346f6be0d98..4b1f4fcc2a2 100644 --- a/lib/gitlab/gl_repository/repo_type.rb +++ b/lib/gitlab/gl_repository/repo_type.rb @@ -29,10 +29,6 @@ module Gitlab end def identifier_for_container(container) - if container.is_a?(Group) - return "#{container.class.name.underscore}-#{container.id}-#{name}" - end - "#{name}-#{container.id}" end @@ -84,3 +80,5 @@ module Gitlab end end end + +Gitlab::GlRepository::RepoType.prepend_if_ee('EE::Gitlab::GlRepository::RepoType') |