Commit 592ed873 authored by Valery Sizov's avatar Valery Sizov

Gitlab.com integration: code folding

parent 33349dd5
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment