forked from Trustie/forgeplus
科技部项目同步木兰镜像用户
This commit is contained in:
parent
34af5a59eb
commit
67020b7e73
|
|
@ -42,10 +42,10 @@ namespace :sync_mulan_repo do
|
|||
def create_repo(data)
|
||||
data.each_with_index do |row, index|
|
||||
begin
|
||||
user_id = 110
|
||||
user = User.find 109
|
||||
tags = row['Tags']
|
||||
repository_name = row['Url'].split("/").last
|
||||
project = Project.where(user_id: user_id).where(identifier: repository_name)
|
||||
project = Project.where(user_id: 110).where(identifier: repository_name)
|
||||
unless project.present?
|
||||
p_category = ProjectCategory.where(name: tags.split(",")).first
|
||||
p_category = ProjectCategory.find_by(name: '其他') if p_category.blank?
|
||||
|
|
|
|||
Loading…
Reference in New Issue