diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /lib/gitlab/gl_repository | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'lib/gitlab/gl_repository')
-rw-r--r-- | lib/gitlab/gl_repository/repo_type.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/gl_repository/repo_type.rb b/lib/gitlab/gl_repository/repo_type.rb index 7792ef55b28..26b0ff86f67 100644 --- a/lib/gitlab/gl_repository/repo_type.rb +++ b/lib/gitlab/gl_repository/repo_type.rb @@ -55,11 +55,11 @@ module Gitlab def repository_for(container) return unless container - repository_resolver.call(container) + repository_resolver.call(select_container(container)) end def project_for(container) - return container unless project_resolver + return select_container(container) unless project_resolver project_resolver.call(container) end @@ -74,6 +74,10 @@ module Gitlab private + def select_container(container) + container.is_a?(::DesignManagement::Repository) ? container.project : container + end + def default_container_class Project end |