Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
338d372c8b02
Commit
592ed873
authored
Feb 02, 2015
by
Valery Sizov
Browse files
Gitlab.com integration: code folding
parent
1d6d2155ad5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/controllers/import/github_controller.rb
View file @
338d372c
...
...
@@ -19,7 +19,7 @@ def status
@already_added_projects
=
current_user
.
created_projects
.
where
(
import_type:
"github"
)
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
def
jobs
...
...
app/controllers/import/gitlab_controller.rb
View file @
338d372c
...
...
@@ -16,11 +16,11 @@ def status
@already_added_projects
=
current_user
.
created_projects
.
where
(
import_type:
"gitlab"
)
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
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
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