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
b9765439
Commit
b9765439
authored
Apr 06, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some issues with credentials
parent
5e51fce4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
app/models/project_import_data.rb
app/models/project_import_data.rb
+2
-2
lib/gitlab/bitbucket_import/client.rb
lib/gitlab/bitbucket_import/client.rb
+6
-6
lib/gitlab/fogbugz_import/importer.rb
lib/gitlab/fogbugz_import/importer.rb
+1
-1
No files found.
app/models/project_import_data.rb
View file @
b9765439
...
...
@@ -22,7 +22,7 @@ class ProjectImportData < ActiveRecord::Base
before_validation
:symbolize_credentials
def
symbolize_credentials
return
if
credentials
.
blank?
credentials
.
deep_symbolize_keys!
# bang doesn't work here
self
.
credentials
=
self
.
credentials
.
deep_symbolize_keys
unless
self
.
credentials
.
blank?
end
end
lib/gitlab/bitbucket_import/client.rb
View file @
b9765439
...
...
@@ -6,10 +6,10 @@ module Gitlab
attr_reader
:consumer
,
:api
def
self
.
from_project
(
project
)
credentials
=
project
.
import_data
if
project
.
import_data
if
credentials
&&
credentials
[
:bb_session
]
token
=
credentials
[
:bb_session
][
:bitbucket_access_token
]
token_secret
=
credentials
[
:bb_session
][
:bitbucket_access_token_secret
]
import_data_credentials
=
project
.
import_data
.
credentials
if
project
.
import_data
if
import_data_credentials
&&
import_data_
credentials
[
:bb_session
]
token
=
import_data_
credentials
[
:bb_session
][
:bitbucket_access_token
]
token_secret
=
import_data_
credentials
[
:bb_session
][
:bitbucket_access_token_secret
]
new
(
token
,
token_secret
)
else
raise
Projects
::
ImportService
::
Error
,
"Unable to find project import data credentials for project ID:
#{
@project
.
id
}
"
...
...
@@ -131,7 +131,7 @@ module Gitlab
end
def
config
Gitlab
.
config
.
omniauth
.
providers
.
find
{
|
provider
|
provider
.
name
==
"bitbucket"
}
Gitlab
.
config
.
omniauth
.
providers
.
find
{
|
provider
|
provider
.
name
==
"bitbucket"
}
end
def
bitbucket_options
...
...
lib/gitlab/fogbugz_import/importer.rb
View file @
b9765439
...
...
@@ -31,7 +31,7 @@ module Gitlab
private
def
import_data_credentials
@import_data_credentials
||=
project
.
import_data
if
project
.
import_data
@import_data_credentials
||=
project
.
import_data
.
credentials
if
project
.
import_data
end
def
user_map
...
...
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