Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
dbe2ac8c
Commit
dbe2ac8c
authored
Dec 16, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubucop offenses
parent
20e472d9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
28 deletions
+27
-28
lib/gitlab/bitbucket_import/importer.rb
lib/gitlab/bitbucket_import/importer.rb
+27
-27
spec/lib/bitbucket/representation/issue_spec.rb
spec/lib/bitbucket/representation/issue_spec.rb
+0
-1
No files found.
lib/gitlab/bitbucket_import/importer.rb
View file @
dbe2ac8c
...
@@ -60,8 +60,6 @@ module Gitlab
...
@@ -60,8 +60,6 @@ module Gitlab
create_labels
create_labels
gitlab_issue
=
nil
client
.
issues
(
repo
).
each
do
|
issue
|
client
.
issues
(
repo
).
each
do
|
issue
|
begin
begin
description
=
''
description
=
''
...
@@ -87,7 +85,11 @@ module Gitlab
...
@@ -87,7 +85,11 @@ module Gitlab
gitlab_issue
.
labels
<<
@labels
[
label_name
]
gitlab_issue
.
labels
<<
@labels
[
label_name
]
if
gitlab_issue
.
persisted?
import_issue_comments
(
issue
,
gitlab_issue
)
if
gitlab_issue
.
persisted?
end
end
def
import_issue_comments
(
issue
,
gitlab_issue
)
client
.
issue_comments
(
repo
,
issue
.
iid
).
each
do
|
comment
|
client
.
issue_comments
(
repo
,
issue
.
iid
).
each
do
|
comment
|
# The note can be blank for issue service messages like "Changed title: ..."
# The note can be blank for issue service messages like "Changed title: ..."
# We would like to import those comments as well but there is no any
# We would like to import those comments as well but there is no any
...
@@ -113,8 +115,6 @@ module Gitlab
...
@@ -113,8 +115,6 @@ module Gitlab
end
end
end
end
end
end
end
end
def
create_labels
def
create_labels
LABELS
.
each
do
|
label
|
LABELS
.
each
do
|
label
|
...
...
spec/lib/bitbucket/representation/issue_spec.rb
View file @
dbe2ac8c
...
@@ -14,7 +14,6 @@ describe Bitbucket::Representation::Issue do
...
@@ -14,7 +14,6 @@ describe Bitbucket::Representation::Issue do
it
{
expect
(
described_class
.
new
({}).
milestone
).
to
be_nil
}
it
{
expect
(
described_class
.
new
({}).
milestone
).
to
be_nil
}
end
end
describe
'#author'
do
describe
'#author'
do
it
{
expect
(
described_class
.
new
({
'reporter'
=>
{
'username'
=>
'Ben'
}
}).
author
).
to
eq
(
'Ben'
)
}
it
{
expect
(
described_class
.
new
({
'reporter'
=>
{
'username'
=>
'Ben'
}
}).
author
).
to
eq
(
'Ben'
)
}
it
{
expect
(
described_class
.
new
({}).
author
).
to
be_nil
}
it
{
expect
(
described_class
.
new
({}).
author
).
to
be_nil
}
...
...
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