Skip to content
Snippets Groups Projects
Commit f6cb42f3 authored by Douwe Maan's avatar Douwe Maan
Browse files

Add comment number to imported Google Code comments.

parent dfe659c1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -52,7 +52,7 @@ module Gitlab
deleted_issues = []
 
issues = repo.raw_data["issues"]["items"]
issues.each_with_index do |raw_issue, i|
issues.each do |raw_issue|
while raw_issue["id"] > last_id + 1
last_id += 1
 
Loading
Loading
@@ -116,14 +116,14 @@ module Gitlab
end
 
def import_issue_comments(issue, comments)
comments.each_with_index do |raw_comment, i|
comments.each do |raw_comment|
next if raw_comment.has_key?("deletedBy")
 
author = mask_email(raw_comment["author"]["name"])
date = DateTime.parse(raw_comment["published"]).to_formatted_s(:long)
 
body = []
body << "*By #{author} on #{date}*"
body << "*Comment #{raw_comment["id"]} by #{author} on #{date}*"
body << "---"
 
content = format_content(raw_comment["content"])
Loading
Loading
Loading
Loading
@@ -57,6 +57,7 @@ describe Gitlab::GoogleCodeImport::Importer do
 
note = project.issues.first.notes.first
expect(note).to_not be_nil
expect(note.note).to include("Comment 1")
expect(note.note).to include("thilo...")
expect(note.note).to include("November 18, 2009 05:14")
expect(note.note).to include("applied, thanks.")
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment