gitlab地址从gitlab获取

This commit is contained in:
huang 2018-06-12 10:09:38 +08:00
parent 614513de0e
commit e26c976bca
1 changed files with 2 additions and 3 deletions

View File

@ -506,7 +506,7 @@ update
# 总的提交数
@changesets_all_count = @g.user_static(@project.gpid, :rev => @rev).count
# 获取默认分支
@g_default_branch = @g_project.default_branch.nil? ? "master" : @g_project.default_branch
@g_default_branch = @g_project.try(:default_branch).nil? ? "master" : @g_project.try(:default_branch)
@creator = @project.owner.to_s
gitlab_address = Redmine::Configuration['gitlab_address']
@ -518,8 +518,7 @@ update
@zip_path = Gitlab.endpoint.to_s + "/projects/" + @project.gpid.to_s + "/repository/archive?&private_token=" + token
@creator = @project.owner.to_s
gitlab_address = Redmine::Configuration['gitlab_address']
@repos_url = gitlab_address.to_s+"/" + @creator + "/" + @repository.identifier+"."+"git"
@repos_url = @g.project(@project.gpid).try(:http_url_to_repo)
# 一些数据的异步同步更新
# 访问版本庫后更新project_score表数据changeset_num为提交总数