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
iv
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
Hide 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
...
@@ -22,7 +22,7 @@ class ProjectImportData < ActiveRecord::Base
before_validation
:symbolize_credentials
before_validation
:symbolize_credentials
def
symbolize_credentials
def
symbolize_credentials
return
if
credentials
.
blank?
# bang doesn't work here
credentials
.
deep_symbolize_keys!
self
.
credentials
=
self
.
credentials
.
deep_symbolize_keys
unless
self
.
credentials
.
blank?
end
end
end
end
lib/gitlab/bitbucket_import/client.rb
View file @
b9765439
...
@@ -6,10 +6,10 @@ module Gitlab
...
@@ -6,10 +6,10 @@ module Gitlab
attr_reader
:consumer
,
:api
attr_reader
:consumer
,
:api
def
self
.
from_project
(
project
)
def
self
.
from_project
(
project
)
credentials
=
project
.
import_data
if
project
.
import_data
import_data_credentials
=
project
.
import_data
.
credentials
if
project
.
import_data
if
credentials
&&
credentials
[
:bb_session
]
if
import_data_credentials
&&
import_data_
credentials
[
:bb_session
]
token
=
credentials
[
:bb_session
][
:bitbucket_access_token
]
token
=
import_data_
credentials
[
:bb_session
][
:bitbucket_access_token
]
token_secret
=
credentials
[
:bb_session
][
:bitbucket_access_token_secret
]
token_secret
=
import_data_
credentials
[
:bb_session
][
:bitbucket_access_token_secret
]
new
(
token
,
token_secret
)
new
(
token
,
token_secret
)
else
else
raise
Projects
::
ImportService
::
Error
,
"Unable to find project import data credentials for project ID:
#{
@project
.
id
}
"
raise
Projects
::
ImportService
::
Error
,
"Unable to find project import data credentials for project ID:
#{
@project
.
id
}
"
...
@@ -65,7 +65,7 @@ module Gitlab
...
@@ -65,7 +65,7 @@ module Gitlab
def
issues
(
project_identifier
)
def
issues
(
project_identifier
)
all_issues
=
[]
all_issues
=
[]
offset
=
0
offset
=
0
per_page
=
50
# Maximum number allowed by Bitbucket
per_page
=
50
# Maximum number allowed by Bitbucket
index
=
0
index
=
0
begin
begin
...
@@ -131,7 +131,7 @@ module Gitlab
...
@@ -131,7 +131,7 @@ module Gitlab
end
end
def
config
def
config
Gitlab
.
config
.
omniauth
.
providers
.
find
{
|
provider
|
provider
.
name
==
"bitbucket"
}
Gitlab
.
config
.
omniauth
.
providers
.
find
{
|
provider
|
provider
.
name
==
"bitbucket"
}
end
end
def
bitbucket_options
def
bitbucket_options
...
...
lib/gitlab/fogbugz_import/importer.rb
View file @
b9765439
...
@@ -31,7 +31,7 @@ module Gitlab
...
@@ -31,7 +31,7 @@ module Gitlab
private
private
def
import_data_credentials
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
end
def
user_map
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