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
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
project_import_data.rb
app/models/project_import_data.rb
+2
-2
client.rb
lib/gitlab/bitbucket_import/client.rb
+6
-6
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
}
"
...
...
@@ -65,7 +65,7 @@ module Gitlab
def
issues
(
project_identifier
)
all_issues
=
[]
offset
=
0
per_page
=
50
# Maximum number allowed by Bitbucket
per_page
=
50
# Maximum number allowed by Bitbucket
index
=
0
begin
...
...
@@ -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