summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 00:05:59 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 00:05:59 +0000
commitfc8c74fd0cbe7384038ead2dd2493f5c63d2b98d (patch)
tree6fe0229558adf41fd48c1e9f6bc5e367011d4976 /lib
parentb35b9ac7e2fd4a707ea9291eb57769c690403b4c (diff)
downloadgitlab-ce-fc8c74fd0cbe7384038ead2dd2493f5c63d2b98d.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/api/project_import.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/project_import.rb b/lib/api/project_import.rb
index 7f1ae5ffbe6..b3f17447ea0 100644
--- a/lib/api/project_import.rb
+++ b/lib/api/project_import.rb
@@ -29,6 +29,7 @@ module API
requires :path, type: String, desc: 'The new project path and name'
# TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab/issues/14960
requires :file, type: File, desc: 'The project export file to be imported' # rubocop:disable Scalability/FileUploads
+ optional :name, type: String, desc: 'The name of the project to be imported. Defaults to the path of the project if not provided.'
optional :namespace, type: String, desc: "The ID or name of the namespace that the project will be imported into. Defaults to the current user's namespace."
optional :overwrite, type: Boolean, default: false, desc: 'If there is a project in the same namespace and with the same name overwrite it'
optional :override_params,
@@ -55,6 +56,7 @@ module API
project_params = {
path: import_params[:path],
namespace_id: namespace.id,
+ name: import_params[:name],
file: import_params[:file]['tempfile'],
overwrite: import_params[:overwrite]
}