Gitlab.com integration: code folding
This commit is contained in:
parent
33349dd549
commit
592ed8738c
|
@ -19,7 +19,7 @@ class Import::GithubController < ApplicationController
|
|||
@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
|
||||
|
|
|
@ -16,11 +16,11 @@ class Import::GitlabController < ApplicationController
|
|||
@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
|
||||
|
||||
|
|
Loading…
Reference in New Issue