2016-06-02 11:05:42 +05:30
|
|
|
module Gitlab
|
|
|
|
module GithubImport
|
|
|
|
class LabelFormatter < BaseFormatter
|
|
|
|
def attributes
|
|
|
|
{
|
|
|
|
project: project,
|
|
|
|
title: title,
|
|
|
|
color: color
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
def klass
|
|
|
|
Label
|
|
|
|
end
|
|
|
|
|
2016-06-02 11:05:42 +05:30
|
|
|
private
|
|
|
|
|
|
|
|
def color
|
|
|
|
"##{raw_data.color}"
|
|
|
|
end
|
|
|
|
|
|
|
|
def title
|
|
|
|
raw_data.name
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|