Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-02-03 04:01:07 +0300
committerValery Sizov <valery@gitlab.com>2015-02-05 23:50:34 +0300
commit33349dd54928a0b074b4ae3ebfabf214799fc085 (patch)
tree593a14d0f6df812410349f353e252e3a58d8cacd /lib/gitlab/import_formatter.rb
parent713bc152bde5396bb95a1555907bcd9a2847839d (diff)
GitLab.com integration: refactoring
Diffstat (limited to 'lib/gitlab/import_formatter.rb')
-rw-r--r--lib/gitlab/import_formatter.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/gitlab/import_formatter.rb b/lib/gitlab/import_formatter.rb
new file mode 100644
index 00000000000..a9283eaf2a5
--- /dev/null
+++ b/lib/gitlab/import_formatter.rb
@@ -0,0 +1,15 @@
+module Gitlab
+ class ImportFormatter
+ def comment_to_md(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, body)
+ "*Created by: #{author}*\n\n#{body}"
+ end
+ end
+end \ No newline at end of file