diff options
Diffstat (limited to 'app/models/ci/stage.rb')
-rw-r--r-- | app/models/ci/stage.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/ci/stage.rb b/app/models/ci/stage.rb index d035eda6df5..d4b6ff910aa 100644 --- a/app/models/ci/stage.rb +++ b/app/models/ci/stage.rb @@ -39,5 +39,13 @@ module Ci def builds @builds ||= pipeline.builds.where(stage: name) end + + def success? + status.to_s == 'success' + end + + def has_warnings? + statuses.latest.failed_but_allowed.any? + end end end |