动态中添加分支
This commit is contained in:
parent
4a8d572cb1
commit
a21200ab14
|
@ -329,7 +329,13 @@ class ProjectsController < ApplicationController
|
|||
@a_commits_add = rep_statics_code.map {|s| s.add.to_i }
|
||||
@a_commits_del = rep_statics_code.map {|s| s.del.to_i }
|
||||
@a_commits_changeset = rep_statics_code.map {|s| s.changeset.to_i }
|
||||
# @static_total_per_user = g.rep_stats(@project.gpid)
|
||||
g = Gitlab.client
|
||||
begin
|
||||
g_branch = g.project(@project.gpid).default_branch.to_s
|
||||
rescue
|
||||
logger.error("get gitlab project failed!")
|
||||
end
|
||||
@rev = g_branch.nil? ? "master" : g_branch
|
||||
end
|
||||
# 根据对应的请求,返回对应的数据
|
||||
respond_to do |format|
|
||||
|
|
|
@ -178,4 +178,4 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
<div class="button-rep">当前分支:develop</div>
|
||||
<div class="button-rep">当前分支:<%= @rev %></div>
|
Loading…
Reference in New Issue