diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /lib/api/projects.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 4e8786fbe1f..83c335a3248 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -61,7 +61,7 @@ module API # Temporarily introduced for upload API: https://gitlab.com/gitlab-org/gitlab/-/issues/325788 def project_attachment_size(user_project) return PROJECT_ATTACHMENT_SIZE_EXEMPT if exempt_from_global_attachment_size?(user_project) - return user_project.max_attachment_size if Feature.enabled?(:enforce_max_attachment_size_upload_api, user_project) + return user_project.max_attachment_size if Feature.enabled?(:enforce_max_attachment_size_upload_api, user_project, default_enabled: :yaml) PROJECT_ATTACHMENT_SIZE_EXEMPT end @@ -234,6 +234,7 @@ module API params do optional :name, type: String, desc: 'The name of the project' optional :path, type: String, desc: 'The path of the repository' + optional :default_branch, type: String, desc: 'The default branch of the project' at_least_one_of :name, :path use :optional_create_project_params use :create_params @@ -660,6 +661,18 @@ module API render_api_error!("Failed to transfer project #{user_project.errors.messages}", 400) end end + + desc 'Show the storage information' do + success Entities::ProjectRepositoryStorage + end + params do + requires :id, type: String, desc: 'ID of a project' + end + get ':id/storage', feature_category: :projects do + authenticated_as_admin! + + present user_project, with: Entities::ProjectRepositoryStorage, current_user: current_user + end end end end |