diff options
Diffstat (limited to 'app/models/ci/commit.rb')
-rw-r--r-- | app/models/ci/commit.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index 6675a3f5d53..86b819f2192 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -131,10 +131,10 @@ module Ci @config_processor ||= begin Ci::GitlabCiYamlProcessor.new(ci_yaml_file, project.path_with_namespace) rescue Ci::GitlabCiYamlProcessor::ValidationError, Psych::SyntaxError => e - save_yaml_error(e.message) + self.yaml_errors = e.message nil rescue - save_yaml_error("Undefined error") + self.yaml_errors = "Undefined error" nil end end @@ -169,11 +169,5 @@ module Ci self.duration = statuses.latest.duration save end - - def save_yaml_error(error) - return if self.yaml_errors? - self.yaml_errors = error - update_state - end end end |