Commit fd6b5894 authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Since GitLab CI is enabled by default, remove enabling it by pushing .gitlab-ci.yml

parent 0df7a32e
...@@ -15,6 +15,7 @@ v 8.2.0 ...@@ -15,6 +15,7 @@ v 8.2.0
- Add allow_failure field to commit status API (Stan Hu) - Add allow_failure field to commit status API (Stan Hu)
- Commits without .gitlab-ci.yml are marked as skipped - Commits without .gitlab-ci.yml are marked as skipped
- Save detailed error when YAML syntax is invalid - 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 - Added build artifacts
- Improved performance of replacing references in comments - Improved performance of replacing references in comments
- Show last project commit to default branch on project home page - Show last project commit to default branch on project home page
......
...@@ -58,12 +58,6 @@ def execute(project, user, oldrev, newrev, ref) ...@@ -58,12 +58,6 @@ def execute(project, user, oldrev, newrev, ref)
@push_data = build_push_data(oldrev, newrev, ref) @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) EventCreateService.new.push(project, user, @push_data)
project.execute_hooks(@push_data.dup, :push_hooks) project.execute_hooks(@push_data.dup, :push_hooks)
project.execute_services(@push_data.dup, :push_hooks) project.execute_services(@push_data.dup, :push_hooks)
...@@ -134,10 +128,4 @@ def is_default_branch?(ref) ...@@ -134,10 +128,4 @@ def is_default_branch?(ref)
def commit_user(commit) def commit_user(commit)
commit.author || user commit.author || user
end end
def gitlab_ci_yaml?(sha)
@project.repository.blob_at(sha, '.gitlab-ci.yml')
rescue Rugged::ReferenceError
nil
end
end end
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