Remove author link since all code.google.com links will be shut down.

This commit is contained in:
Douwe Maan 2015-04-14 13:10:25 +02:00
parent 06399b3261
commit dfe659c16d
2 changed files with 6 additions and 10 deletions

View File

@ -66,12 +66,11 @@ module Gitlab
end end
last_id = raw_issue["id"] last_id = raw_issue["id"]
author = mask_email(raw_issue["author"]["name"]) author = mask_email(raw_issue["author"]["name"])
author_link = raw_issue["author"]["htmlLink"] date = DateTime.parse(raw_issue["published"]).to_formatted_s(:long)
date = DateTime.parse(raw_issue["published"]).to_formatted_s(:long)
body = [] body = []
body << "*By [#{author}](#{author_link}) on #{date}*" body << "*By #{author} on #{date}*"
body << "---" body << "---"
comments = raw_issue["comments"]["items"] comments = raw_issue["comments"]["items"]
@ -120,12 +119,11 @@ module Gitlab
comments.each_with_index do |raw_comment, i| comments.each_with_index do |raw_comment, i|
next if raw_comment.has_key?("deletedBy") next if raw_comment.has_key?("deletedBy")
author = mask_email(raw_comment["author"]["name"]) author = mask_email(raw_comment["author"]["name"])
author_link = raw_comment["author"]["htmlLink"] date = DateTime.parse(raw_comment["published"]).to_formatted_s(:long)
date = DateTime.parse(raw_comment["published"]).to_formatted_s(:long)
body = [] body = []
body << "*By [#{author}](#{author_link}) on #{date}*" body << "*By #{author} on #{date}*"
body << "---" body << "---"
content = format_content(raw_comment["content"]) content = format_content(raw_comment["content"])

View File

@ -43,7 +43,6 @@ describe Gitlab::GoogleCodeImport::Importer do
expect(issue.title).to eq("Scrolling through tasks") expect(issue.title).to eq("Scrolling through tasks")
expect(issue.state).to eq("closed") expect(issue.state).to eq("closed")
expect(issue.description).to include("schattenpr...") expect(issue.description).to include("schattenpr...")
expect(issue.description).to include("https://code.google.com/u/106498139506637530000/")
expect(issue.description).to include("November 18, 2009 00:20") expect(issue.description).to include("November 18, 2009 00:20")
expect(issue.description).to include('I like to scroll through the tasks with my scrollwheel \(like in fluxbox\).') expect(issue.description).to include('I like to scroll through the tasks with my scrollwheel \(like in fluxbox\).')
expect(issue.description).to include('Patch is attached that adds two new mouse\-actions \(next\_taskprev\_task\)') expect(issue.description).to include('Patch is attached that adds two new mouse\-actions \(next\_taskprev\_task\)')
@ -59,7 +58,6 @@ describe Gitlab::GoogleCodeImport::Importer do
note = project.issues.first.notes.first note = project.issues.first.notes.first
expect(note).to_not be_nil expect(note).to_not be_nil
expect(note.note).to include("thilo...") expect(note.note).to include("thilo...")
expect(note.note).to include("https://code.google.com/u/104224918623172014000/")
expect(note.note).to include("November 18, 2009 05:14") expect(note.note).to include("November 18, 2009 05:14")
expect(note.note).to include("applied, thanks.") expect(note.note).to include("applied, thanks.")
expect(note.note).to include("Status: Fixed") expect(note.note).to include("Status: Fixed")