同步项目

修改同步参数问题
This commit is contained in:
huang 2015-11-04 16:19:25 +08:00
parent e2435dff4b
commit 58b7250d39
2 changed files with 2 additions and 3 deletions

View File

@ -3,7 +3,7 @@
namespace :sync_rep do
desc "sync some projects which just have sigle repository"
task :sigle => :environment do
projects = Project.where("id =?",24)
projects = Project.all
projects.each do |project|
# 针对类型为Git并且只有一个版本库的项目
if project.repositories && project.repositories.count == 1 && project.repositories.first.type == "Repository::Git"
@ -16,8 +16,6 @@ namespace :sync_rep do
puts project.id
puts rep.id
puts rep.identifier
puts rep.url
puts project.user_id
end
end
end

View File

@ -76,6 +76,7 @@ module Trustie
wall_enabled: false,
issues_enabled: false,
snippets_enabled: false,
merge_requests_enabled: true,
public: false,
user_id: gid,
import_url: import_url