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