2016-07-28 12:35:02 +00:00
|
|
|
module Gitlab
|
|
|
|
module Badge
|
2017-07-19 11:08:47 +00:00
|
|
|
module Pipeline
|
2016-07-28 12:35:02 +00:00
|
|
|
##
|
2017-07-19 11:08:47 +00:00
|
|
|
# Class that describes pipeline badge metadata
|
2016-07-28 12:35:02 +00:00
|
|
|
#
|
2016-08-11 12:08:27 +00:00
|
|
|
class Metadata < Badge::Metadata
|
2016-08-11 09:16:14 +00:00
|
|
|
def initialize(badge)
|
|
|
|
@project = badge.project
|
|
|
|
@ref = badge.ref
|
2016-07-28 12:35:02 +00:00
|
|
|
end
|
|
|
|
|
2016-08-11 12:08:27 +00:00
|
|
|
def title
|
2017-07-19 11:08:47 +00:00
|
|
|
'pipeline status'
|
2016-07-28 12:35:02 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def image_url
|
2017-07-19 11:08:47 +00:00
|
|
|
pipeline_project_badges_url(@project, @ref, format: :svg)
|
2016-07-28 12:35:02 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def link_url
|
2017-06-29 17:06:35 +00:00
|
|
|
project_commits_url(@project, id: @ref)
|
2016-07-28 12:35:02 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|