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
592ed873
Commit
592ed873
authored
Feb 02, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gitlab.com integration: code folding
parent
33349dd5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/import/github_controller.rb
app/controllers/import/github_controller.rb
+1
-1
app/controllers/import/gitlab_controller.rb
app/controllers/import/gitlab_controller.rb
+2
-2
No files found.
app/controllers/import/github_controller.rb
View file @
592ed873
...
@@ -19,7 +19,7 @@ class Import::GithubController < ApplicationController
...
@@ -19,7 +19,7 @@ class Import::GithubController < ApplicationController
@already_added_projects
=
current_user
.
created_projects
.
where
(
import_type:
"github"
)
@already_added_projects
=
current_user
.
created_projects
.
where
(
import_type:
"github"
)
already_added_projects_names
=
@already_added_projects
.
pluck
(
:import_source
)
already_added_projects_names
=
@already_added_projects
.
pluck
(
:import_source
)
@repos
.
reject!
{
|
repo
|
already_added_projects_names
.
include?
repo
.
full_name
}
@repos
.
reject!
{
|
repo
|
already_added_projects_names
.
include?
repo
.
full_name
}
end
end
def
jobs
def
jobs
...
...
app/controllers/import/gitlab_controller.rb
View file @
592ed873
...
@@ -16,11 +16,11 @@ class Import::GitlabController < ApplicationController
...
@@ -16,11 +16,11 @@ class Import::GitlabController < ApplicationController
@already_added_projects
=
current_user
.
created_projects
.
where
(
import_type:
"gitlab"
)
@already_added_projects
=
current_user
.
created_projects
.
where
(
import_type:
"gitlab"
)
already_added_projects_names
=
@already_added_projects
.
pluck
(
:import_source
)
already_added_projects_names
=
@already_added_projects
.
pluck
(
:import_source
)
@repos
.
to_a
.
reject!
{
|
repo
|
already_added_projects_names
.
include?
repo
[
"path_with_namespace"
]
}
@repos
.
to_a
.
reject!
{
|
repo
|
already_added_projects_names
.
include?
repo
[
"path_with_namespace"
]
}
end
end
def
jobs
def
jobs
jobs
=
current_user
.
created_projects
.
where
(
import_type:
"gitlab"
).
to_json
(
:only
=>
[
:id
,
:import_status
])
jobs
=
current_user
.
created_projects
.
where
(
import_type:
"gitlab"
).
to_json
(
only:
[
:id
,
:import_status
])
render
json:
jobs
render
json:
jobs
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