diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-09-07 22:22:52 +0200 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-09-07 22:22:52 +0200 |
commit | 1e816a972164c515bf99c39bd8880dd23e534c9e (patch) | |
tree | 6a149060c78aaf0460ee4a4084fb9c2f729c0b9a /app/models | |
parent | 49598c58ebca5807cc63eb7b17872018c6f48503 (diff) | |
download | gitlab-ce-1e816a972164c515bf99c39bd8880dd23e534c9e.tar.gz |
Address MR suggestions
CE mirror of c4578b951e331fe8c75cd4f948ce74cec6587bad
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/blob_viewer/gitlab_ci_yml.rb | 8 | ||||
-rw-r--r-- | app/models/ci/pipeline.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/models/blob_viewer/gitlab_ci_yml.rb b/app/models/blob_viewer/gitlab_ci_yml.rb index 54462d01b66..655241c2808 100644 --- a/app/models/blob_viewer/gitlab_ci_yml.rb +++ b/app/models/blob_viewer/gitlab_ci_yml.rb @@ -10,16 +10,16 @@ module BlobViewer self.file_types = %i(gitlab_ci) self.binary = false - def validation_message(project, ref) + def validation_message(project, sha) return @validation_message if defined?(@validation_message) prepare! - @validation_message = Gitlab::Ci::YamlProcessor.validation_message(blob.data, { project: project, branch_name: ref }) + @validation_message = Gitlab::Ci::YamlProcessor.validation_message(blob.data, { project: project, sha: sha }) end - def valid?(project, ref) - validation_message(project, ref).blank? + def valid?(project, sha) + validation_message(project, sha).blank? end end end diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 27e0ade2722..bec0aff2ba0 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -475,7 +475,7 @@ module Ci end def initialize_yaml_processor - Gitlab::Ci::YamlProcessor.new(ci_yaml_file, { project: project, branch_name: ref }) + ::Gitlab::Ci::YamlProcessor.new(ci_yaml_file, { project: project, sha: sha }) end def ci_yaml_file_path |