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
5ba77a49
Commit
5ba77a49
authored
Aug 07, 2019
by
George Koltsov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add author lines to project import comments
parent
f5fcb9a1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
lib/bitbucket/representation/comment.rb
lib/bitbucket/representation/comment.rb
+1
-1
lib/bitbucket/representation/issue.rb
lib/bitbucket/representation/issue.rb
+1
-1
lib/bitbucket/representation/pull_request.rb
lib/bitbucket/representation/pull_request.rb
+1
-1
lib/gitlab/bitbucket_import/importer.rb
lib/gitlab/bitbucket_import/importer.rb
+10
-2
No files found.
lib/bitbucket/representation/comment.rb
View file @
5ba77a49
...
@@ -4,7 +4,7 @@ module Bitbucket
...
@@ -4,7 +4,7 @@ module Bitbucket
module
Representation
module
Representation
class
Comment
<
Representation
::
Base
class
Comment
<
Representation
::
Base
def
author
def
author
user
[
'
user
name'
]
user
[
'
nick
name'
]
end
end
def
note
def
note
...
...
lib/bitbucket/representation/issue.rb
View file @
5ba77a49
...
@@ -14,7 +14,7 @@ module Bitbucket
...
@@ -14,7 +14,7 @@ module Bitbucket
end
end
def
author
def
author
raw
.
dig
(
'reporter'
,
'
user
name'
)
raw
.
dig
(
'reporter'
,
'
nick
name'
)
end
end
def
description
def
description
...
...
lib/bitbucket/representation/pull_request.rb
View file @
5ba77a49
...
@@ -4,7 +4,7 @@ module Bitbucket
...
@@ -4,7 +4,7 @@ module Bitbucket
module
Representation
module
Representation
class
PullRequest
<
Representation
::
Base
class
PullRequest
<
Representation
::
Base
def
author
def
author
raw
.
fetch
(
'author'
,
{}).
fetch
(
'
user
name'
,
nil
)
raw
.
fetch
(
'author'
,
{}).
fetch
(
'
nick
name'
,
nil
)
end
end
def
description
def
description
...
...
lib/gitlab/bitbucket_import/importer.rb
View file @
5ba77a49
...
@@ -260,15 +260,23 @@ module Gitlab
...
@@ -260,15 +260,23 @@ module Gitlab
end
end
def
pull_request_comment_attributes
(
comment
)
def
pull_request_comment_attributes
(
comment
)
author_id
=
gitlab_user_id
(
project
,
comment
.
author
)
{
{
project:
project
,
project:
project
,
note:
comment
.
note
,
note:
comment
_note
(
comment
,
author_id
)
,
author_id:
gitlab_user_id
(
project
,
comment
.
author
)
,
author_id:
author_id
,
created_at:
comment
.
created_at
,
created_at:
comment
.
created_at
,
updated_at:
comment
.
updated_at
updated_at:
comment
.
updated_at
}
}
end
end
def
comment_note
(
comment
,
author_id
)
note
=
''
note
+=
@formatter
.
author_line
(
comment
.
author
)
if
author_id
==
project
.
creator_id
note
+
comment
.
note
end
def
log_error
(
details
)
def
log_error
(
details
)
logger
.
error
(
log_base_data
.
merge
(
details
))
logger
.
error
(
log_base_data
.
merge
(
details
))
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