diff options
Diffstat (limited to 'lib/gitlab/badge/build/status.rb')
-rw-r--r-- | lib/gitlab/badge/build/status.rb | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/gitlab/badge/build/status.rb b/lib/gitlab/badge/build/status.rb deleted file mode 100644 index b762d85b6e5..00000000000 --- a/lib/gitlab/badge/build/status.rb +++ /dev/null @@ -1,37 +0,0 @@ -module Gitlab - module Badge - module Build - ## - # Build status badge - # - class Status < Badge::Base - attr_reader :project, :ref - - def initialize(project, ref) - @project = project - @ref = ref - - @sha = @project.commit(@ref).try(:sha) - end - - def entity - 'build' - end - - def status - @project.pipelines - .where(sha: @sha) - .latest_status(@ref) || 'unknown' - end - - def metadata - @metadata ||= Build::Metadata.new(self) - end - - def template - @template ||= Build::Template.new(self) - end - end - end - end -end |