Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 10:08:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 10:08:36 +0300
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /lib/gitlab/gl_repository
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'lib/gitlab/gl_repository')
-rw-r--r--lib/gitlab/gl_repository/identifier.rb13
-rw-r--r--lib/gitlab/gl_repository/repo_type.rb6
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')