From b5623d3fd981750e6bf67d4629de2aed36437fc9 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 21 Mar 2019 15:52:18 +0100 Subject: Backport API::Helpers::ProjectsHelpers from EE This backports all changes made to this module in EE to CE, and wraps EE specific code in a conditional. --- lib/api/helpers/projects_helpers.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/api/helpers/projects_helpers.rb b/lib/api/helpers/projects_helpers.rb index e6a72b949f9..ad2e069d94d 100644 --- a/lib/api/helpers/projects_helpers.rb +++ b/lib/api/helpers/projects_helpers.rb @@ -31,8 +31,19 @@ module API optional :initialize_with_readme, type: Boolean, desc: "Initialize a project with a README.md" end + if Gitlab.ee? + params :optional_project_params_ee do + optional :repository_storage, type: String, desc: 'Which storage shard the repository is on. Available only to admins' + optional :approvals_before_merge, type: Integer, desc: 'How many approvers should approve merge request by default' + optional :external_authorization_classification_label, type: String, desc: 'The classification label for the project' + optional :mirror, type: Boolean, desc: 'Enables pull mirroring in a project' + optional :mirror_trigger_builds, type: Boolean, desc: 'Pull mirroring triggers builds' + end + end + params :optional_project_params do use :optional_project_params_ce + use :optional_project_params_ee if Gitlab.ee? end end end -- cgit v1.2.1