BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
dfe659c1
Commit
dfe659c1
authored
Apr 14, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove author link since all code.google.com links will be shut down.
parent
06399b32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
importer.rb
lib/gitlab/google_code_import/importer.rb
+6
-8
importer_spec.rb
spec/lib/gitlab/google_code_import/importer_spec.rb
+0
-2
No files found.
lib/gitlab/google_code_import/importer.rb
View file @
dfe659c1
...
...
@@ -66,12 +66,11 @@ module Gitlab
end
last_id
=
raw_issue
[
"id"
]
author
=
mask_email
(
raw_issue
[
"author"
][
"name"
])
author_link
=
raw_issue
[
"author"
][
"htmlLink"
]
date
=
DateTime
.
parse
(
raw_issue
[
"published"
]).
to_formatted_s
(
:long
)
author
=
mask_email
(
raw_issue
[
"author"
][
"name"
])
date
=
DateTime
.
parse
(
raw_issue
[
"published"
]).
to_formatted_s
(
:long
)
body
=
[]
body
<<
"*By
[
#{
author
}
](
#{
author_link
}
)
on
#{
date
}
*"
body
<<
"*By
#{
author
}
on
#{
date
}
*"
body
<<
"---"
comments
=
raw_issue
[
"comments"
][
"items"
]
...
...
@@ -120,12 +119,11 @@ module Gitlab
comments
.
each_with_index
do
|
raw_comment
,
i
|
next
if
raw_comment
.
has_key?
(
"deletedBy"
)
author
=
mask_email
(
raw_comment
[
"author"
][
"name"
])
author_link
=
raw_comment
[
"author"
][
"htmlLink"
]
date
=
DateTime
.
parse
(
raw_comment
[
"published"
]).
to_formatted_s
(
:long
)
author
=
mask_email
(
raw_comment
[
"author"
][
"name"
])
date
=
DateTime
.
parse
(
raw_comment
[
"published"
]).
to_formatted_s
(
:long
)
body
=
[]
body
<<
"*By
[
#{
author
}
](
#{
author_link
}
)
on
#{
date
}
*"
body
<<
"*By
#{
author
}
on
#{
date
}
*"
body
<<
"---"
content
=
format_content
(
raw_comment
[
"content"
])
...
...
spec/lib/gitlab/google_code_import/importer_spec.rb
View file @
dfe659c1
...
...
@@ -43,7 +43,6 @@ describe Gitlab::GoogleCodeImport::Importer do
expect
(
issue
.
title
).
to
eq
(
"Scrolling through tasks"
)
expect
(
issue
.
state
).
to
eq
(
"closed"
)
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
(
'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\)'
)
...
...
@@ -59,7 +58,6 @@ describe Gitlab::GoogleCodeImport::Importer do
note
=
project
.
issues
.
first
.
notes
.
first
expect
(
note
).
to_not
be_nil
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
(
"applied, thanks."
)
expect
(
note
.
note
).
to
include
(
"Status: Fixed"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment