BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5e2f68e5
Commit
5e2f68e5
authored
Dec 16, 2016
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bitbucket-oauth2' of gitlab.com:gitlab-org/gitlab-ce into bitbucket-oauth2
parents
27f271ee
fc42f969
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
importer.rb
lib/gitlab/bitbucket_import/importer.rb
+4
-6
No files found.
lib/gitlab/bitbucket_import/importer.rb
View file @
5e2f68e5
...
...
@@ -28,6 +28,7 @@ module Gitlab
def
handle_errors
return
unless
errors
.
any?
project
.
update_column
(
:import_error
,
{
message:
'The remote data could not be fully imported.'
,
errors:
errors
...
...
@@ -35,15 +36,12 @@ module Gitlab
end
def
gitlab_user_id
(
project
,
username
)
if
username
user
=
find_user
(
username
)
(
user
&&
user
.
id
)
||
project
.
creator_id
else
project
.
creator_id
end
user
=
find_user
(
username
)
user
.
try
(
:id
)
||
project
.
creator_id
end
def
find_user
(
username
)
return
nil
unless
username
User
.
joins
(
:identities
).
find_by
(
"identities.extern_uid = ? AND identities.provider = 'bitbucket'"
,
username
)
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