diff options
| author | Ruben Davila <rdavila84@gmail.com> | 2017-05-02 13:20:41 -0500 |
|---|---|---|
| committer | Ruben Davila <rdavila84@gmail.com> | 2017-05-02 13:20:41 -0500 |
| commit | bbfbcebdf69261bac6aa142f430719955e8e86b9 (patch) | |
| tree | 25916a1a761cb6c8fcdac4b20b76017a7f4506d3 /lib/api/projects.rb | |
| parent | 3b82444eb7791e58e3e0ba2f08b8ccde48e3d4c6 (diff) | |
| parent | 920d55b9f8afd35e16351fb57d671acf66092e89 (diff) | |
| download | gitlab-ce-bbfbcebdf69261bac6aa142f430719955e8e86b9.tar.gz | |
Merge branch 'master' into 28433-internationalise-cycle-analytics-page
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 |
