diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-09-07 23:03:05 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-09-07 23:03:05 +0300 |
commit | 3149b5cfea4d8f14d69bb2520974f588454a0762 (patch) | |
tree | 8cb9fac721255e2ecf2c21ac1b18f1af430f252a /app/models/blob_viewer | |
parent | 1a53f017b4c2106da3425f3dcbe40fb95fd44bbf (diff) |
Improve external architecture
CE mirror of 4f17c7b2c30188302e6a73421acbf5a09fb2c823
Diffstat (limited to 'app/models/blob_viewer')
-rw-r--r-- | app/models/blob_viewer/gitlab_ci_yml.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/blob_viewer/gitlab_ci_yml.rb b/app/models/blob_viewer/gitlab_ci_yml.rb index f5e4367fc09..54462d01b66 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 + def validation_message(project, ref) return @validation_message if defined?(@validation_message) prepare! - @validation_message = Gitlab::Ci::YamlProcessor.validation_message(blob.data, project) + @validation_message = Gitlab::Ci::YamlProcessor.validation_message(blob.data, { project: project, branch_name: ref }) end - def valid? - validation_message.blank? + def valid?(project, ref) + validation_message(project, ref).blank? end end end |