diff options
Diffstat (limited to 'lib/gitlab/github_import/label_formatter.rb')
-rw-r--r-- | lib/gitlab/github_import/label_formatter.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/label_formatter.rb b/lib/gitlab/github_import/label_formatter.rb new file mode 100644 index 00000000000..9f18244e7d7 --- /dev/null +++ b/lib/gitlab/github_import/label_formatter.rb @@ -0,0 +1,27 @@ +module Gitlab + module GithubImport + class LabelFormatter < BaseFormatter + def attributes + { + project: project, + title: title, + color: color + } + end + + def klass + Label + end + + private + + def color + "##{raw_data.color}" + end + + def title + raw_data.name + end + end + end +end |