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.
This commit is contained in:
Yorick Peterse 2019-03-21 15:52:18 +01:00
parent c3b24826d1
commit b5623d3fd9
No known key found for this signature in database
GPG Key ID: EDD30D2BEB691AC9
1 changed files with 11 additions and 0 deletions

View File

@ -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