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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
3bc114a7
Commit
3bc114a7
authored
Mar 01, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BB Importer] Save the error trace and the whole raw document
parent
3082a119
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
changelogs/unreleased/bb_save_trace.yml
changelogs/unreleased/bb_save_trace.yml
+5
-0
lib/bitbucket/representation/base.rb
lib/bitbucket/representation/base.rb
+2
-4
lib/gitlab/bitbucket_import/importer.rb
lib/gitlab/bitbucket_import/importer.rb
+2
-2
No files found.
changelogs/unreleased/bb_save_trace.yml
0 → 100644
View file @
3bc114a7
---
title
:
"
[BB
Importer]
Save
the
error
trace
and
the
whole
raw
document
to
debug
problems
easier"
merge_request
:
author
:
lib/bitbucket/representation/base.rb
View file @
3bc114a7
module
Bitbucket
module
Bitbucket
module
Representation
module
Representation
class
Base
class
Base
attr_reader
:raw
def
initialize
(
raw
)
def
initialize
(
raw
)
@raw
=
raw
@raw
=
raw
end
end
...
@@ -8,10 +10,6 @@ module Bitbucket
...
@@ -8,10 +10,6 @@ module Bitbucket
def
self
.
decorate
(
entries
)
def
self
.
decorate
(
entries
)
entries
.
map
{
|
entry
|
new
(
entry
)}
entries
.
map
{
|
entry
|
new
(
entry
)}
end
end
private
attr_reader
:raw
end
end
end
end
end
end
lib/gitlab/bitbucket_import/importer.rb
View file @
3bc114a7
...
@@ -149,7 +149,7 @@ module Gitlab
...
@@ -149,7 +149,7 @@ module Gitlab
description
+=
@formatter
.
author_line
(
pull_request
.
author
)
unless
find_user_id
(
pull_request
.
author
)
description
+=
@formatter
.
author_line
(
pull_request
.
author
)
unless
find_user_id
(
pull_request
.
author
)
description
+=
pull_request
.
description
description
+=
pull_request
.
description
merge_request
=
project
.
merge_requests
.
create
(
merge_request
=
project
.
merge_requests
.
create
!
(
iid:
pull_request
.
iid
,
iid:
pull_request
.
iid
,
title:
pull_request
.
title
,
title:
pull_request
.
title
,
description:
description
,
description:
description
,
...
@@ -168,7 +168,7 @@ module Gitlab
...
@@ -168,7 +168,7 @@ module Gitlab
import_pull_request_comments
(
pull_request
,
merge_request
)
if
merge_request
.
persisted?
import_pull_request_comments
(
pull_request
,
merge_request
)
if
merge_request
.
persisted?
rescue
StandardError
=>
e
rescue
StandardError
=>
e
errors
<<
{
type: :pull_request
,
iid:
pull_request
.
iid
,
errors:
e
.
message
}
errors
<<
{
type: :pull_request
,
iid:
pull_request
.
iid
,
errors:
e
.
message
,
trace:
e
.
backtrace
.
join
(
"
\n
"
),
raw_response:
pull_request
.
raw
}
end
end
end
end
end
end
...
...
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