From a9ab6dbc637bc0a531760b0425d655a507827db3 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 17 Jan 2019 00:35:40 -0800 Subject: Refactor use of Shell.import_repository for Wikis The previous behavior would pass in a list of parameters to Shell, but we can improve this by using the WikiFormatter and Project models to give us the same information. --- lib/gitlab/shell.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/gitlab/shell.rb') diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb index 6f896f03947..62fcc08ffdf 100644 --- a/lib/gitlab/shell.rb +++ b/lib/gitlab/shell.rb @@ -86,6 +86,14 @@ module Gitlab false end + def import_wiki_repository(project, wiki_formatter) + import_repository(project.repository_storage, wiki_formatter.disk_path, wiki_formatter.import_url, project.wiki.full_path) + end + + def import_project_repository(project) + import_repository(project.repository_storage, project.disk_path, project.import_url, project.full_path) + end + # Import repository # # storage - project's storage name -- cgit v1.2.3