diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-09 16:48:03 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-13 10:52:50 +0100 |
commit | 6384c757b7ce6d1c0c3e2a3828b0cfac26dfb7f9 (patch) | |
tree | 8d6b5db2f275eb8ebb28f9ebd2beb2b492bb357e /app/services | |
parent | 37465f44b40df9709507fda7a022f1907b23d53f (diff) | |
download | gitlab-ce-6384c757b7ce6d1c0c3e2a3828b0cfac26dfb7f9.tar.gz |
Expose CI enable option in project features
- Enable CI by default for all new projects
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/git_push_service.rb | 2 | ||||
-rw-r--r-- | app/services/projects/fork_service.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index 3de7bb9dcaa..ccb6b97858c 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -60,7 +60,7 @@ class GitPushService # If CI was disabled but .gitlab-ci.yml file was pushed # we enable CI automatically - if !project.gitlab_ci? && gitlab_ci_yaml?(newrev) + if !project.builds_enabled? && gitlab_ci_yaml?(newrev) project.enable_ci end diff --git a/app/services/projects/fork_service.rb b/app/services/projects/fork_service.rb index 46374a3909a..5da1c7afd92 100644 --- a/app/services/projects/fork_service.rb +++ b/app/services/projects/fork_service.rb @@ -17,7 +17,7 @@ module Projects new_project = CreateService.new(current_user, new_params).execute if new_project.persisted? - if @project.gitlab_ci? + if @project.builds_enabled? new_project.enable_ci settings = @project.gitlab_ci_project.attributes.select do |attr_name, value| |