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
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-17 03:06:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-17 03:06:11 +0300
commit48c77599ca5d833ce01ca310af4887200875174f (patch)
treeaade7cdac1b3f5ee266f5df1caf3b745dcd14a8d /lib
parent274ea604fcd43ecccfba04756a9475a3efa47de0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/api/helpers/projects_helpers.rb8
-rw-r--r--lib/api/projects.rb4
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/api/helpers/projects_helpers.rb b/lib/api/helpers/projects_helpers.rb
index f247c722c44..07f0386d14d 100644
--- a/lib/api/helpers/projects_helpers.rb
+++ b/lib/api/helpers/projects_helpers.rb
@@ -56,6 +56,14 @@ module API
use :optional_project_params_ee
end
+ params :optional_create_project_params_ee do
+ end
+
+ params :optional_create_project_params do
+ use :optional_project_params
+ use :optional_create_project_params_ee
+ end
+
params :optional_filter_params_ee do
end
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 74de9fcec68..c28b03ac6c9 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -68,6 +68,8 @@ module API
params :create_params do
optional :namespace_id, type: Integer, desc: 'Namespace ID for the new project. Default to the user namespace.'
optional :import_url, type: String, desc: 'URL from which the project is imported'
+ optional :template_name, type: String, desc: "Name of template from which to create project"
+ mutually_exclusive :import_url, :template_name
end
def load_projects
@@ -155,7 +157,7 @@ module API
optional :name, type: String, desc: 'The name of the project'
optional :path, type: String, desc: 'The path of the repository'
at_least_one_of :name, :path
- use :optional_project_params
+ use :optional_create_project_params
use :create_params
end
post do