debian-mirror-gitlab/lib/gitlab/import_formatter.rb

24 lines
457 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2015-04-26 12:48:37 +05:30
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
2015-09-25 12:07:36 +05:30
def author_line(author)
2018-11-08 19:23:39 +05:30
author ||= "Anonymous"
2015-09-25 12:07:36 +05:30
"*Created by: #{author}*\n\n"
2015-04-26 12:48:37 +05:30
end
2020-04-22 19:07:51 +05:30
def assignee_line(assignee)
assignee ||= "Anonymous"
"*Assigned to: #{assignee}*\n\n"
end
2015-04-26 12:48:37 +05:30
end
end