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
7e55bb88
Commit
7e55bb88
authored
Jul 09, 2020
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove jobs from importers
Path jobs was replaced by realtime_changes
parent
1ce28983
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
0 additions
and
45 deletions
+0
-45
app/controllers/import/base_controller.rb
app/controllers/import/base_controller.rb
+0
-9
app/controllers/import/bitbucket_controller.rb
app/controllers/import/bitbucket_controller.rb
+0
-4
app/controllers/import/bitbucket_server_controller.rb
app/controllers/import/bitbucket_server_controller.rb
+0
-4
app/controllers/import/fogbugz_controller.rb
app/controllers/import/fogbugz_controller.rb
+0
-4
app/controllers/import/gitlab_controller.rb
app/controllers/import/gitlab_controller.rb
+0
-4
config/routes/import.rb
config/routes/import.rb
+0
-4
spec/controllers/import/bitbucket_server_controller_spec.rb
spec/controllers/import/bitbucket_server_controller_spec.rb
+0
-16
No files found.
app/controllers/import/base_controller.rb
View file @
7e55bb88
...
...
@@ -87,15 +87,6 @@ class Import::BaseController < ApplicationController
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: disable CodeReuse/ActiveRecord
def
find_jobs
(
import_type
)
current_user
.
created_projects
.
with_import_state
.
where
(
import_type:
import_type
)
.
to_json
(
only:
[
:id
],
methods:
[
:import_status
])
end
# rubocop: enable CodeReuse/ActiveRecord
# deprecated: being replaced by app/services/import/base_service.rb
def
find_or_create_namespace
(
names
,
owner
)
names
=
params
[
:target_namespace
].
presence
||
names
...
...
app/controllers/import/bitbucket_controller.rb
View file @
7e55bb88
...
...
@@ -26,10 +26,6 @@ class Import::BitbucketController < Import::BaseController
super
end
def
jobs
render
json:
find_jobs
(
'bitbucket'
)
end
def
realtime_changes
super
end
...
...
app/controllers/import/bitbucket_server_controller.rb
View file @
7e55bb88
...
...
@@ -56,10 +56,6 @@ class Import::BitbucketServerController < Import::BaseController
super
end
def
jobs
render
json:
find_jobs
(
'bitbucket_server'
)
end
def
realtime_changes
super
end
...
...
app/controllers/import/fogbugz_controller.rb
View file @
7e55bb88
...
...
@@ -58,10 +58,6 @@ class Import::FogbugzController < Import::BaseController
super
end
def
jobs
render
json:
find_jobs
(
'fogbugz'
)
end
def
create
repo
=
client
.
repo
(
params
[
:repo_id
])
fb_session
=
{
uri:
session
[
:fogbugz_uri
],
token:
session
[
:fogbugz_token
]
}
...
...
app/controllers/import/gitlab_controller.rb
View file @
7e55bb88
...
...
@@ -20,10 +20,6 @@ class Import::GitlabController < Import::BaseController
super
end
def
jobs
render
json:
find_jobs
(
'gitlab'
)
end
def
create
repo
=
client
.
project
(
params
[
:repo_id
].
to_i
)
target_namespace
=
find_or_create_namespace
(
repo
[
'namespace'
][
'path'
],
client
.
user
[
'username'
])
...
...
config/routes/import.rb
View file @
7e55bb88
...
...
@@ -24,14 +24,12 @@ namespace :import do
resource
:gitlab
,
only:
[
:create
],
controller: :gitlab
do
get
:status
get
:callback
get
:jobs
get
:realtime_changes
end
resource
:bitbucket
,
only:
[
:create
],
controller: :bitbucket
do
get
:status
get
:callback
get
:jobs
get
:realtime_changes
end
...
...
@@ -39,7 +37,6 @@ namespace :import do
post
:configure
get
:status
get
:callback
get
:jobs
get
:realtime_changes
end
...
...
@@ -55,7 +52,6 @@ namespace :import do
resource
:fogbugz
,
only:
[
:create
,
:new
],
controller: :fogbugz
do
get
:status
post
:callback
get
:jobs
get
:realtime_changes
get
:new_user_map
,
path: :user_map
...
...
spec/controllers/import/bitbucket_server_controller_spec.rb
View file @
7e55bb88
...
...
@@ -180,20 +180,4 @@ RSpec.describe Import::BitbucketServerController do
end
end
end
describe
'GET jobs'
do
before
do
assign_session_tokens
end
it
'returns a list of imported projects'
do
created_project
=
create
(
:project
,
import_type:
'bitbucket_server'
,
creator_id:
user
.
id
)
get
:jobs
expect
(
json_response
.
count
).
to
eq
(
1
)
expect
(
json_response
.
first
[
'id'
]).
to
eq
(
created_project
.
id
)
expect
(
json_response
.
first
[
'import_status'
]).
to
eq
(
'none'
)
end
end
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