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
Tatuya Kamada
gitlab-ce
Commits
7a155137
Commit
7a155137
authored
Nov 21, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec for Bitbucket importer
parent
fc40c3f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/bitbucket_import/importer.rb
lib/gitlab/bitbucket_import/importer.rb
+3
-3
spec/lib/gitlab/bitbucket_import/importer_spec.rb
spec/lib/gitlab/bitbucket_import/importer_spec.rb
+1
-1
No files found.
lib/gitlab/bitbucket_import/importer.rb
View file @
7a155137
...
...
@@ -94,7 +94,7 @@ module Gitlab
import_pull_request_comments
(
pull_request
,
merge_request
)
if
merge_request
.
persisted?
rescue
ActiveRecord
::
RecordInvalid
nil
Rails
.
log
.
error
(
"Bitbucket importer ERROR in
#{
project
.
path_with_namespace
}
: Invalid pull request
#{
e
.
message
}
"
)
end
end
end
...
...
@@ -134,7 +134,7 @@ module Gitlab
merge_request
.
notes
.
create!
(
attributes
)
rescue
ActiveRecord
::
RecordInvalid
=>
e
Rails
.
log
.
error
(
"Bitbucket importer ERROR: Invalid pull request comment
#{
e
.
message
}
"
)
Rails
.
log
.
error
(
"Bitbucket importer ERROR
in
#{
project
.
path_with_namespace
}
: Invalid pull request comment
#{
e
.
message
}
"
)
nil
end
end
...
...
@@ -145,7 +145,7 @@ module Gitlab
begin
merge_request
.
notes
.
create!
(
pull_request_comment_attributes
(
comment
))
rescue
ActiveRecord
::
RecordInvalid
=>
e
Rails
.
log
.
error
(
"Bitbucket importer ERROR: Invalid standalone pull request comment
#{
e
.
message
}
"
)
Rails
.
log
.
error
(
"Bitbucket importer ERROR
in
#{
project
.
path_with_namespace
}
: Invalid standalone pull request comment
#{
e
.
message
}
"
)
nil
end
end
...
...
spec/lib/gitlab/bitbucket_import/importer_spec.rb
View file @
7a155137
...
...
@@ -98,7 +98,7 @@ describe Gitlab::BitbucketImport::Importer, lib: true do
it
'map statuses to open or closed'
do
# HACK: Bitbucket::Representation.const_get('Issue') seems to return Issue without this
Bitbucket
::
Representation
::
Issue
.
new
Bitbucket
::
Representation
::
Issue
.
new
({})
importer
.
execute
expect
(
project
.
issues
.
where
(
state:
"closed"
).
size
).
to
eq
(
5
)
...
...
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