summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2019-06-26 19:29:35 +0700
committerShinya Maeda <shinya@gitlab.com>2019-07-04 09:53:40 +0700
commit93be669e16b71a00362187a690e573209d80d960 (patch)
tree6fc866212596ae5a2fbde9b917ea944363b7f8fa /app/models
parent19dc1105524e3d25821670706a750043775588fa (diff)
downloadgitlab-ce-93be669e16b71a00362187a690e573209d80d960.tar.gz
Refactor pipeline errors_messagerefactor-pipeline-errors_message-ce
Use the shared method in Ci::Pipeline
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ci/pipeline.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index fd5aa216174..20ca4a9ab24 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -790,6 +790,10 @@ module Ci
stages.find_by!(name: name)
end
+ def error_messages
+ errors ? errors.full_messages.to_sentence : ""
+ end
+
private
def ci_yaml_from_repo