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
Boxiang Sun
gitlab-ce
Commits
9a9e22a8
Commit
9a9e22a8
authored
Sep 08, 2016
by
Andrew Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `gl_user_id` to `gitlab_user_id` in importer classes
parent
43d6328f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
lib/gitlab/bitbucket_import/importer.rb
lib/gitlab/bitbucket_import/importer.rb
+2
-2
lib/gitlab/github_import/base_formatter.rb
lib/gitlab/github_import/base_formatter.rb
+1
-1
lib/gitlab/github_import/comment_formatter.rb
lib/gitlab/github_import/comment_formatter.rb
+1
-1
lib/gitlab/github_import/issue_formatter.rb
lib/gitlab/github_import/issue_formatter.rb
+2
-2
lib/gitlab/github_import/pull_request_formatter.rb
lib/gitlab/github_import/pull_request_formatter.rb
+2
-2
lib/gitlab/gitlab_import/importer.rb
lib/gitlab/gitlab_import/importer.rb
+2
-2
No files found.
lib/gitlab/bitbucket_import/importer.rb
View file @
9a9e22a8
...
...
@@ -21,7 +21,7 @@ module Gitlab
private
def
g
l
_user_id
(
project
,
bitbucket_id
)
def
g
itlab
_user_id
(
project
,
bitbucket_id
)
if
bitbucket_id
user
=
User
.
joins
(
:identities
).
find_by
(
"identities.extern_uid = ? AND identities.provider = 'bitbucket'"
,
bitbucket_id
.
to_s
)
(
user
&&
user
.
id
)
||
project
.
creator_id
...
...
@@ -74,7 +74,7 @@ module Gitlab
description:
body
,
title:
issue
[
"title"
],
state:
%w(resolved invalid duplicate wontfix closed)
.
include?
(
issue
[
"status"
])
?
'closed'
:
'opened'
,
author_id:
g
l
_user_id
(
project
,
reporter
)
author_id:
g
itlab
_user_id
(
project
,
reporter
)
)
end
rescue
ActiveRecord
::
RecordInvalid
=>
e
...
...
lib/gitlab/github_import/base_formatter.rb
View file @
9a9e22a8
...
...
@@ -15,7 +15,7 @@ module Gitlab
private
def
g
l
_user_id
(
github_id
)
def
g
itlab
_user_id
(
github_id
)
User
.
joins
(
:identities
).
find_by
(
"identities.extern_uid = ? AND identities.provider = 'github'"
,
github_id
.
to_s
).
try
(
:id
)
...
...
lib/gitlab/github_import/comment_formatter.rb
View file @
9a9e22a8
...
...
@@ -21,7 +21,7 @@ module Gitlab
end
def
author_id
g
l
_user_id
(
raw_data
.
user
.
id
)
||
project
.
creator_id
g
itlab
_user_id
(
raw_data
.
user
.
id
)
||
project
.
creator_id
end
def
body
...
...
lib/gitlab/github_import/issue_formatter.rb
View file @
9a9e22a8
...
...
@@ -40,7 +40,7 @@ module Gitlab
def
assignee_id
if
assigned?
g
l
_user_id
(
raw_data
.
assignee
.
id
)
g
itlab
_user_id
(
raw_data
.
assignee
.
id
)
end
end
...
...
@@ -49,7 +49,7 @@ module Gitlab
end
def
author_id
g
l
_user_id
(
raw_data
.
user
.
id
)
||
project
.
creator_id
g
itlab
_user_id
(
raw_data
.
user
.
id
)
||
project
.
creator_id
end
def
body
...
...
lib/gitlab/github_import/pull_request_formatter.rb
View file @
9a9e22a8
...
...
@@ -68,7 +68,7 @@ module Gitlab
def
assignee_id
if
assigned?
g
l
_user_id
(
raw_data
.
assignee
.
id
)
g
itlab
_user_id
(
raw_data
.
assignee
.
id
)
end
end
...
...
@@ -77,7 +77,7 @@ module Gitlab
end
def
author_id
g
l
_user_id
(
raw_data
.
user
.
id
)
||
project
.
creator_id
g
itlab
_user_id
(
raw_data
.
user
.
id
)
||
project
.
creator_id
end
def
body
...
...
lib/gitlab/gitlab_import/importer.rb
View file @
9a9e22a8
...
...
@@ -41,7 +41,7 @@ module Gitlab
title:
issue
[
"title"
],
state:
issue
[
"state"
],
updated_at:
issue
[
"updated_at"
],
author_id:
g
l
_user_id
(
project
,
issue
[
"author"
][
"id"
])
author_id:
g
itlab
_user_id
(
project
,
issue
[
"author"
][
"id"
])
)
end
end
...
...
@@ -51,7 +51,7 @@ module Gitlab
private
def
g
l
_user_id
(
project
,
gitlab_id
)
def
g
itlab
_user_id
(
project
,
gitlab_id
)
user
=
User
.
joins
(
:identities
).
find_by
(
"identities.extern_uid = ? AND identities.provider = 'gitlab'"
,
gitlab_id
.
to_s
)
(
user
&&
user
.
id
)
||
project
.
creator_id
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