Read about our upcoming Code of Conduct on this issue

Commit 0227e98d authored by Patricio Cano's avatar Patricio Cano
Browse files

Added CHANGELOG, documentation, and API functionality

parent 5099c0177d5f
......@@ -25,6 +25,7 @@ v 8.12.0 (unreleased)
- Add horizontal scrolling to all sub-navs on mobile viewports (ClemMakesApps)
- Fix markdown help references (ClemMakesApps)
- Add last commit time to repo view (ClemMakesApps)
- Added project specific enable/disable setting for LFS !5997
- Added tests for diff notes
- Add a button to download latest successful artifacts for branches and tags !5142
- Add delimiter to project stars and forks count (ClemMakesApps)
......
......@@ -452,6 +452,7 @@ Parameters:
- `import_url` (optional)
- `public_builds` (optional)
- `only_allow_merge_if_build_succeeds` (optional)
- `enable_lfs` (optional)
### Create project for user
......@@ -478,6 +479,7 @@ Parameters:
- `import_url` (optional)
- `public_builds` (optional)
- `only_allow_merge_if_build_succeeds` (optional)
- `enable_lfs` (optional)
### Edit project
......@@ -505,6 +507,7 @@ Parameters:
- `visibility_level` (optional)
- `public_builds` (optional)
- `only_allow_merge_if_build_succeeds` (optional)
- `enable_lfs` (optional)
On success, method returns 200 with the updated project. If parameters are
invalid, 400 is returned.
......
......@@ -33,3 +33,11 @@ Snippets are little bits of code or text.
This is a nice place to put code or text that is used semi-regularly within the project, but does not belong in source control.
For example, a specific config file that is used by > the team that is only valid for the people that work on the code.
## LFS
>**Note:** Project specific LFS setting was added on 8.12 and is available only to admins.
Git Large File Storage allows you to easily manage large binary files with Git.
With this setting admins can keep better control of which projects are allowed
to use LFS, thus allowing for better storage usage control.
......@@ -78,7 +78,7 @@ class Project < Grape::Entity
expose :path, :path_with_namespace
expose :issues_enabled, :merge_requests_enabled, :wiki_enabled, :builds_enabled, :snippets_enabled, :container_registry_enabled
expose :created_at, :last_activity_at
expose :shared_runners_enabled
expose :shared_runners_enabled, :enable_lfs
expose :creator_id
expose :namespace
expose :forked_from_project, using: Entities::BasicProjectDetails, if: lambda{ |project, options| project.forked? }
......
......@@ -105,6 +105,7 @@ def map_public_to_visibility_level(attrs)
# visibility_level (optional) - 0 by default
# import_url (optional)
# public_builds (optional)
# enable_lfs (optional)
# Example Request
# POST /projects
post do
......@@ -124,7 +125,8 @@ def map_public_to_visibility_level(attrs)
:visibility_level,
:import_url,
:public_builds,
:only_allow_merge_if_build_succeeds]
:only_allow_merge_if_build_succeeds,
:enable_lfs]
attrs = map_public_to_visibility_level(attrs)
@project = ::Projects::CreateService.new(current_user, attrs).execute
if @project.saved?
......@@ -220,6 +222,7 @@ def map_public_to_visibility_level(attrs)
# public (optional) - if true same as setting visibility_level = 20
# visibility_level (optional) - visibility level of a project
# public_builds (optional)
# enable_lfs (optional)
# Example Request
# PUT /projects/:id
put ':id' do
......@@ -237,7 +240,8 @@ def map_public_to_visibility_level(attrs)
:public,
:visibility_level,
:public_builds,
:only_allow_merge_if_build_succeeds]
:only_allow_merge_if_build_succeeds,
:enable_lfs]
attrs = map_public_to_visibility_level(attrs)
authorize_admin_project
authorize! :rename_project, user_project if attrs[:name].present?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment