diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-19 12:09:24 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-19 12:09:34 +0100 |
commit | fd6b58949652c5fb9925c061fae823da7e468ca2 (patch) | |
tree | 6df24df025f312f7d012ba9b596c5efe003902d3 | |
parent | 0df7a32ea50baf251f03e6bfc5b91c5ccb68aad0 (diff) | |
download | gitlab-ce-fd6b58949652c5fb9925c061fae823da7e468ca2.tar.gz |
Since GitLab CI is enabled by default, remove enabling it by pushing .gitlab-ci.yml
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/services/git_push_service.rb | 12 |
2 files changed, 1 insertions, 12 deletions
diff --git a/CHANGELOG b/CHANGELOG index ea8d5d6000f..01f18dea23b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,7 @@ v 8.2.0 - Add allow_failure field to commit status API (Stan Hu) - Commits without .gitlab-ci.yml are marked as skipped - Save detailed error when YAML syntax is invalid + - Since GitLab CI is enabled by default, remove enabling it by pushing .gitlab-ci.yml - Added build artifacts - Improved performance of replacing references in comments - Show last project commit to default branch on project home page diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index ccb6b97858c..f11690aa3f4 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -58,12 +58,6 @@ class GitPushService @push_data = build_push_data(oldrev, newrev, ref) - # If CI was disabled but .gitlab-ci.yml file was pushed - # we enable CI automatically - if !project.builds_enabled? && gitlab_ci_yaml?(newrev) - project.enable_ci - end - EventCreateService.new.push(project, user, @push_data) project.execute_hooks(@push_data.dup, :push_hooks) project.execute_services(@push_data.dup, :push_hooks) @@ -134,10 +128,4 @@ class GitPushService def commit_user(commit) commit.author || user end - - def gitlab_ci_yaml?(sha) - @project.repository.blob_at(sha, '.gitlab-ci.yml') - rescue Rugged::ReferenceError - nil - end end |