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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ef85c510
Commit
ef85c510
authored
Apr 04, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected a couple of based on MR review
parent
43ee65e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
...e/20160302152808_remove_wrong_import_url_from_projects.rb
+2
-2
lib/gitlab/fogbugz_import/importer.rb
lib/gitlab/fogbugz_import/importer.rb
+1
-2
No files found.
db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
View file @
ef85c510
...
@@ -16,8 +16,8 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration
...
@@ -16,8 +16,8 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration
say
(
"Projects and Github projects with a wrong URL. It also migrates Gitlab project credentials."
)
say
(
"Projects and Github projects with a wrong URL. It also migrates Gitlab project credentials."
)
in_transaction
{
process_projects_with_wrong_url
}
in_transaction
{
process_projects_with_wrong_url
}
say
(
"Migrating bitbucket credentials..."
)
# TODO remove last param
say
(
"Migrating bitbucket credentials..."
)
in_transaction
{
process_project
(
import_type:
'bitbucket'
,
unencrypted_data:
[
'repo'
,
'user_map'
]
)
}
in_transaction
{
process_project
(
import_type:
'bitbucket'
)
}
say
(
"Migrating fogbugz credentials..."
)
say
(
"Migrating fogbugz credentials..."
)
in_transaction
{
process_project
(
import_type:
'fogbugz'
,
unencrypted_data:
[
'repo'
,
'user_map'
])
}
in_transaction
{
process_project
(
import_type:
'fogbugz'
,
unencrypted_data:
[
'repo'
,
'user_map'
])
}
...
...
lib/gitlab/fogbugz_import/importer.rb
View file @
ef85c510
...
@@ -8,7 +8,7 @@ module Gitlab
...
@@ -8,7 +8,7 @@ module Gitlab
import_data
=
project
.
import_data
.
try
(
:data
)
import_data
=
project
.
import_data
.
try
(
:data
)
repo_data
=
import_data
[
'repo'
]
if
import_data
repo_data
=
import_data
[
'repo'
]
if
import_data
if
defined?
(
repo_data
)
if
repo_data
@repo
=
FogbugzImport
::
Repository
.
new
(
repo_data
)
@repo
=
FogbugzImport
::
Repository
.
new
(
repo_data
)
@known_labels
=
Set
.
new
@known_labels
=
Set
.
new
else
else
...
@@ -18,7 +18,6 @@ module Gitlab
...
@@ -18,7 +18,6 @@ module Gitlab
def
execute
def
execute
return
true
unless
repo
.
valid?
return
true
unless
repo
.
valid?
Rails
.
logger
.
error
import_data_credentials
.
inspect
client
=
Gitlab
::
FogbugzImport
::
Client
.
new
(
token:
import_data_credentials
[
'fb_session'
][
'token'
],
uri:
import_data_credentials
[
'fb_session'
][
'uri'
])
client
=
Gitlab
::
FogbugzImport
::
Client
.
new
(
token:
import_data_credentials
[
'fb_session'
][
'token'
],
uri:
import_data_credentials
[
'fb_session'
][
'uri'
])
@cases
=
client
.
cases
(
@repo
.
id
.
to_i
)
@cases
=
client
.
cases
(
@repo
.
id
.
to_i
)
...
...
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