diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-04-04 22:00:32 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-04-04 22:00:32 +0300 |
commit | d883fe1cce01f53a3acc442e8b94ca20540e0525 (patch) | |
tree | 47d93dc076ffc7ffd9f7729beb0725bea41e4bdd /lib/gitlab/ci | |
parent | 75f8a45f6a202aa5bec00613dcd16573fc1cc46a (diff) |
Add success CI Build empty state status
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/status/build/factory.rb | 3 | ||||
-rw-r--r-- | lib/gitlab/ci/status/build/success.rb | 21 |
2 files changed, 23 insertions, 1 deletions
diff --git a/lib/gitlab/ci/status/build/factory.rb b/lib/gitlab/ci/status/build/factory.rb index b809a9cf766..d3a34384f6f 100644 --- a/lib/gitlab/ci/status/build/factory.rb +++ b/lib/gitlab/ci/status/build/factory.rb @@ -8,7 +8,8 @@ module Gitlab Status::Build::Canceled, Status::Build::Created, Status::Build::Pending, - Status::Build::Skipped], + Status::Build::Skipped, + Status::Build::Success], [Status::Build::Cancelable, Status::Build::Retryable], [Status::Build::FailedAllowed, diff --git a/lib/gitlab/ci/status/build/success.rb b/lib/gitlab/ci/status/build/success.rb new file mode 100644 index 00000000000..bafc1b2f93a --- /dev/null +++ b/lib/gitlab/ci/status/build/success.rb @@ -0,0 +1,21 @@ +module Gitlab + module Ci + module Status + module Build + class Success < Status::Extended + def illustration + { + image: 'illustrations/skipped-job_empty.svg', + size: 'svg-430', + title: _('Job has been erased') + } + end + + def self.matches?(build, user) + build.success? + end + end + end + end + end +end |