diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-10-02 09:44:22 +0900 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-10-02 17:08:14 +0200 |
commit | 336affe911885a84c2f14193e3fa43f0320c0cb2 (patch) | |
tree | e0397d34878546ad2073d4fb017a9c904420dc8b /lib | |
parent | 51a8177658b2a90e78b762667b37807a72d7a982 (diff) | |
download | gitlab-ce-336affe911885a84c2f14193e3fa43f0320c0cb2.tar.gz |
Add scheduled status
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/status/pipeline/blocked.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/ci/status/pipeline/factory.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/ci/status/pipeline/scheduled.rb | 21 |
3 files changed, 23 insertions, 1 deletions
diff --git a/lib/gitlab/ci/status/pipeline/blocked.rb b/lib/gitlab/ci/status/pipeline/blocked.rb index 59fcd8ad7ff..bf7e484ee9b 100644 --- a/lib/gitlab/ci/status/pipeline/blocked.rb +++ b/lib/gitlab/ci/status/pipeline/blocked.rb @@ -8,7 +8,7 @@ module Gitlab end def label - s_('CiStatusLabel|waiting for manual action or delayed job') + s_('CiStatusLabel|waiting for manual action') end def self.matches?(pipeline, user) diff --git a/lib/gitlab/ci/status/pipeline/factory.rb b/lib/gitlab/ci/status/pipeline/factory.rb index 17f9a75f436..00d8f01cbdc 100644 --- a/lib/gitlab/ci/status/pipeline/factory.rb +++ b/lib/gitlab/ci/status/pipeline/factory.rb @@ -5,6 +5,7 @@ module Gitlab class Factory < Status::Factory def self.extended_statuses [[Status::SuccessWarning, + Status::Pipeline::Scheduled, Status::Pipeline::Blocked]] end diff --git a/lib/gitlab/ci/status/pipeline/scheduled.rb b/lib/gitlab/ci/status/pipeline/scheduled.rb new file mode 100644 index 00000000000..9ec6994bd2f --- /dev/null +++ b/lib/gitlab/ci/status/pipeline/scheduled.rb @@ -0,0 +1,21 @@ +module Gitlab + module Ci + module Status + module Pipeline + class Scheduled < Status::Extended + def text + s_('CiStatusText|scheduled') + end + + def label + s_('CiStatusLabel|waiting for delayed job') + end + + def self.matches?(pipeline, user) + pipeline.scheduled? + end + end + end + end + end +end |