diff options
| author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-22 21:01:50 +0200 |
|---|---|---|
| committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-22 21:01:50 +0200 |
| commit | 8c8f6db4578051300794c7032bc63d68f70cce16 (patch) | |
| tree | f48f82ed1418ff9a6d810b4f354629d7a275b606 /lib/api/projects.rb | |
| parent | a8231ea1befd803fb5892ea3e6679219f5d7d8e5 (diff) | |
| parent | 1005389f70070245092c1ae5f3f9b10b8e7c102e (diff) | |
| download | gitlab-ce-8c8f6db4578051300794c7032bc63d68f70cce16.tar.gz | |
Merge branch 'master' into feature/gb/manual-actions-protected-branches-permissions
* master: (274 commits)
Update VERSION to 9.2.0-pre
Update CHANGELOG.md for 9.1.0
Update Auto Deploy documentation
Disable import URL field in New project form since it's hidden by default
Remove reference to burndown charts since they don't exist for ce.
Use master_password for Sentinel
Refactor Discussions docs
Start versioning cached markdown fields
Refactor add_users method for project and group
Improved the spec Now correctly tests against different forms
Refactor environments components into vue files - part 3
Adding animation for all dropdown
fix placeholder visibility
submodule_links: handle urls that don't end with .git
Add help regarding vue resource and where to include it
Append .json to ajax endpoint to prevent browser to display raw json
Fixed the preview keyboard shortcut focusing wrong tab
Fix broken link
Added new discussions docs
Started on resolvable discussions docs
...
Diffstat (limited to 'lib/api/projects.rb')
| -rw-r--r-- | lib/api/projects.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 50842370947..db4b31b55bc 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -11,7 +11,7 @@ module API optional :issues_enabled, type: Boolean, desc: 'Flag indication if the issue tracker is enabled' optional :merge_requests_enabled, type: Boolean, desc: 'Flag indication if merge requests are enabled' optional :wiki_enabled, type: Boolean, desc: 'Flag indication if the wiki is enabled' - optional :builds_enabled, type: Boolean, desc: 'Flag indication if builds are enabled' + optional :jobs_enabled, type: Boolean, desc: 'Flag indication if jobs are enabled' optional :snippets_enabled, type: Boolean, desc: 'Flag indication if snippets are enabled' optional :shared_runners_enabled, type: Boolean, desc: 'Flag indication if shared runners are enabled for that project' optional :container_registry_enabled, type: Boolean, desc: 'Flag indication if the container registry is enabled for that project' @@ -103,6 +103,7 @@ module API end post do attrs = declared_params(include_missing: false) + attrs[:builds_enabled] = attrs.delete(:jobs_enabled) if attrs.has_key?(:jobs_enabled) project = ::Projects::CreateService.new(current_user, attrs).execute if project.saved? @@ -205,7 +206,7 @@ module API # CE at_least_one_of_ce = [ - :builds_enabled, + :jobs_enabled, :container_registry_enabled, :default_branch, :description, @@ -236,6 +237,8 @@ module API authorize! :rename_project, user_project if attrs[:name].present? authorize! :change_visibility_level, user_project if attrs[:visibility].present? + attrs[:builds_enabled] = attrs.delete(:jobs_enabled) if attrs.has_key?(:jobs_enabled) + result = ::Projects::UpdateService.new(user_project, current_user, attrs).execute if result[:status] == :success |
