Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-05 17:06:35 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-05 17:06:35 +0300
commit29a7c6796e75d3a36c613622c7c7507646fd93a0 (patch)
tree43cedaf7357fd4b5c8fa8a363dda12d4a7b6fdaa /app/models
parentc9853897229ca5585c69c4675cbeefd9ca53147d (diff)
Fix GitLabCiService and remove ci_yaml_file from CI push data
Diffstat (limited to 'app/models')
-rw-r--r--app/models/project_services/gitlab_ci_service.rb23
1 files changed, 2 insertions, 21 deletions
diff --git a/app/models/project_services/gitlab_ci_service.rb b/app/models/project_services/gitlab_ci_service.rb
index 17d1ef71945..b63a75cf3af 100644
--- a/app/models/project_services/gitlab_ci_service.rb
+++ b/app/models/project_services/gitlab_ci_service.rb
@@ -40,18 +40,9 @@ class GitlabCiService < CiService
def execute(data)
return unless supported_events.include?(data[:object_kind])
- sha = data[:checkout_sha]
-
- if sha.present?
- file = ci_yaml_file(sha)
-
- if file && file.data
- data.merge!(ci_yaml_file: file.data)
- end
- end
-
- ci_project = Ci::Project.find_by(gitlab_id: project.id)
+ ci_project = project.gitlab_ci_project
if ci_project
+ current_user = User.find_by(id: data[:user_id])
Ci::CreateCommitService.new.execute(ci_project, current_user, data)
end
end
@@ -99,14 +90,4 @@ class GitlabCiService < CiService
def fields
[]
end
-
- private
-
- def ci_yaml_file(sha)
- repository.blob_at(sha, '.gitlab-ci.yml')
- end
-
- def repository
- project.repository
- end
end