|
|
|
@ -92,6 +92,22 @@ class RepositoriesController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def create
|
|
|
|
|
if params[:repository_scm].to_s == 'Gitlab'
|
|
|
|
|
# add by nwb
|
|
|
|
|
# 增加对gitlab版本库的支持
|
|
|
|
|
attrs = pickup_extra_info
|
|
|
|
|
@repository = Repository.factory(params[:repository_scm])
|
|
|
|
|
@repository.safe_attributes = params[:repository]
|
|
|
|
|
if attrs[:attrs_extra].keys.any?
|
|
|
|
|
@repository.merge_extra_info(attrs[:attrs_extra])
|
|
|
|
|
end
|
|
|
|
|
@repository.project = @project
|
|
|
|
|
if request.post? && @repository.save
|
|
|
|
|
redirect_to settings_project_path(@project, :tab => 'repositories')
|
|
|
|
|
else
|
|
|
|
|
render :action => 'new'
|
|
|
|
|
end
|
|
|
|
|
else # 原逻辑
|
|
|
|
|
##xianbo
|
|
|
|
|
@root_path=RepositoriesHelper::ROOT_PATH
|
|
|
|
|
@repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git"
|
|
|
|
@ -144,6 +160,7 @@ class RepositoriesController < ApplicationController
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def edit
|
|
|
|
|
end
|
|
|
|
|