|
|
@ -227,7 +227,7 @@ class SubjectsController < ApplicationController
|
|
|
|
GitService.add_repository(repo_path: repo_path)
|
|
|
|
GitService.add_repository(repo_path: repo_path)
|
|
|
|
# todo: 为什么保存的时候要去除后面的.git呢??
|
|
|
|
# todo: 为什么保存的时候要去除后面的.git呢??
|
|
|
|
@shixun.update_column(:repo_name, repo_path.split(".")[0])
|
|
|
|
@shixun.update_column(:repo_name, repo_path.split(".")[0])
|
|
|
|
mirror_id = MirrorRepository.find_by(type_name: 'Python').id
|
|
|
|
mirror_id = MirrorRepository.find_by(type_name: 'Python3.6').id
|
|
|
|
if mirror_id
|
|
|
|
if mirror_id
|
|
|
|
ShixunMirrorRepository.create!(:shixun_id => @shixun.id, :mirror_repository_id => mirror_id)
|
|
|
|
ShixunMirrorRepository.create!(:shixun_id => @shixun.id, :mirror_repository_id => mirror_id)
|
|
|
|
@shixun.shixun_service_configs.create!(:shixun_id => @shixun.id, :mirror_repository_id => mirror_id)
|
|
|
|
@shixun.shixun_service_configs.create!(:shixun_id => @shixun.id, :mirror_repository_id => mirror_id)
|
|
|
|