diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-09-24 13:12:11 +0900 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-10-02 17:02:12 +0200 |
commit | 571a934f29bee7af9569176e62e5376b471e35fb (patch) | |
tree | b380dc4345cf3e44c438f23481bbf2730926f2fb /lib | |
parent | f8e680b786377443471780d9a096dfb2b873de4a (diff) | |
download | gitlab-ce-571a934f29bee7af9569176e62e5376b471e35fb.tar.gz |
Fix spec. Create scheduled status entry for pipeline
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/status/pipeline/factory.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/ci/status/pipeline/scheduled.rb | 21 |
2 files changed, 22 insertions, 0 deletions
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..5e8f99e58d7 --- /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 scheduled job') + end + + def self.matches?(pipeline, user) + pipeline.scheduled? + end + end + end + end + end +end |