Commit 7a7a4356 authored by Mayra Cabrera's avatar Mayra Cabrera

Moves script_failure conditional over lambda

So the 'failed' message can actually indicate if the build failed or not
parent 0bc9e0b4
...@@ -26,7 +26,7 @@ class JobEntity < Grape::Entity ...@@ -26,7 +26,7 @@ class JobEntity < Grape::Entity
expose :created_at expose :created_at
expose :updated_at expose :updated_at
expose :detailed_status, as: :status, with: StatusEntity expose :detailed_status, as: :status, with: StatusEntity
expose :callout_message, if: -> (*) { failed? } expose :callout_message, if: -> (*) { failed? && !build.script_failure? }
expose :recoverable, if: -> (*) { failed? } expose :recoverable, if: -> (*) { failed? }
private private
...@@ -54,7 +54,7 @@ class JobEntity < Grape::Entity ...@@ -54,7 +54,7 @@ class JobEntity < Grape::Entity
end end
def failed? def failed?
build.failed? && !build.script_failure? build.failed?
end end
def callout_message def callout_message
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment