summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_formatter.rb
blob: b272adf81669a2a12e2df32bacd650135ef459a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module Gitlab
  class ImportFormatter
    def comment(author, date, body)
      "\n\n*By #{author} on #{date}*\n\n#{body}"
    end

    def comments_header
      "\n\n\n**Imported comments:**\n"
    end

    def author_line(author)
      author ||= "Anonymous"
      "*Created by: #{author}*\n\n"
    end

    def assignee_line(assignee)
      assignee ||= "Anonymous"
      "*Assigned to: #{assignee}*\n\n"
    end
  end
end