blob: 3101116a6142c8a0758775c477286e7b1c60ea4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
module Gitlab
module GithubImport
class LabelFormatter < BaseFormatter
def attributes
{
project: project,
title: title,
color: color
}
end
def klass
Label
end
def create!
params = attributes.except(:project)
service = ::Labels::CreateService.new(project.owner, project, params)
service.execute
end
private
def color
"##{raw_data.color}"
end
def title
raw_data.name
end
end
end
end
|