summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-03-09 10:20:00 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2017-03-09 10:20:00 +0000
commit1dc2e185b8dfb7dfdccabe28998b30265f4ef39d (patch)
treef1b68b1e2325e28f2a2ca72365559a9279695651 /lib
parent72e940df2c24ab80056dfe296011c7a44ebdf3f0 (diff)
parent82327ea7c68faf4bb3231c0418f277fde876ec59 (diff)
downloadgitlab-ce-1dc2e185b8dfb7dfdccabe28998b30265f4ef39d.tar.gz
Merge branch 'feature/gb/verbosify-blocked-pipeline-status' into 'master'
Verbosify blocked pipeline status description Closes #29134 See merge request !9800
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/status/pipeline/blocked.rb23
-rw-r--r--lib/gitlab/ci/status/pipeline/factory.rb3
2 files changed, 25 insertions, 1 deletions
diff --git a/lib/gitlab/ci/status/pipeline/blocked.rb b/lib/gitlab/ci/status/pipeline/blocked.rb
new file mode 100644
index 00000000000..a250c3fcb41
--- /dev/null
+++ b/lib/gitlab/ci/status/pipeline/blocked.rb
@@ -0,0 +1,23 @@
+module Gitlab
+ module Ci
+ module Status
+ module Pipeline
+ class Blocked < SimpleDelegator
+ include Status::Extended
+
+ def text
+ 'blocked'
+ end
+
+ def label
+ 'waiting for manual action'
+ end
+
+ def self.matches?(pipeline, user)
+ pipeline.blocked?
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/ci/status/pipeline/factory.rb b/lib/gitlab/ci/status/pipeline/factory.rb
index 13c8343b12a..17f9a75f436 100644
--- a/lib/gitlab/ci/status/pipeline/factory.rb
+++ b/lib/gitlab/ci/status/pipeline/factory.rb
@@ -4,7 +4,8 @@ module Gitlab
module Pipeline
class Factory < Status::Factory
def self.extended_statuses
- [Status::SuccessWarning]
+ [[Status::SuccessWarning,
+ Status::Pipeline::Blocked]]
end
def self.common_helpers