summaryrefslogtreecommitdiff
path: root/lib/api/project_import.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-04-09 08:52:19 +0200
committerJames Lopez <james@jameslopez.es>2018-04-09 08:52:19 +0200
commit88b903c569c8c47433d291c215c43396c297ace8 (patch)
tree2395bc1f468be1d35f09661a87ab84b5fe0d4703 /lib/api/project_import.rb
parent99ac00b1fdb29e7fec890567ba9bae3dbd8e9061 (diff)
parent86ca1a77c58b508fc1b037c5fffbfb22fd992b42 (diff)
downloadgitlab-ce-88b903c569c8c47433d291c215c43396c297ace8.tar.gz
Merge remote-tracking branch 'origin/master' into 10-7-stable-prepare-rc310-7-stable-prepare-rc3
Diffstat (limited to 'lib/api/project_import.rb')
-rw-r--r--lib/api/project_import.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/project_import.rb b/lib/api/project_import.rb
index 303b58a5942..bc5152e539f 100644
--- a/lib/api/project_import.rb
+++ b/lib/api/project_import.rb
@@ -26,6 +26,7 @@ module API
requires :path, type: String, desc: 'The new project path and name'
requires :file, type: File, desc: 'The project export file to be imported'
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,
type: Hash,
desc: 'New project params to override values in the export' do
@@ -50,7 +51,8 @@ module API
project_params = {
path: import_params[:path],
namespace_id: namespace.id,
- file: import_params[:file]['tempfile']
+ file: import_params[:file]['tempfile'],
+ overwrite: import_params[:overwrite]
}
override_params = import_params.delete(:override_params)