|
|
|
@ -250,6 +250,14 @@ update
|
|
|
|
|
return -1
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if params[:to] == 'gitlab'
|
|
|
|
|
g = Gitlab.client
|
|
|
|
|
g.post('/session', body: {email: User.current.mail, password: User.current.hashed_password})
|
|
|
|
|
redirect_to "http://192.168.41.130:3000/gitlab-org/gitlab-shell/tree/master"
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#if( !User.current.member_of?(@project) || @project.hidden_repo)
|
|
|
|
|
@repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty?
|
|
|
|
|
|
|
|
|
@ -540,11 +548,12 @@ update
|
|
|
|
|
:stack => :side,
|
|
|
|
|
:scale_integers => true,
|
|
|
|
|
:step_x_labels => 2,
|
|
|
|
|
:show_data_values => false,
|
|
|
|
|
:show_data_values => true,
|
|
|
|
|
:graph_title => l(:label_commits_per_month),
|
|
|
|
|
:show_graph_title => true
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# 具状图
|
|
|
|
|
graph.add_data(
|
|
|
|
|
:data => commits_by_month[0..11].reverse,
|
|
|
|
|
:title => l(:label_revision_plural)
|
|
|
|
@ -560,7 +569,7 @@ update
|
|
|
|
|
|
|
|
|
|
def graph_commits_per_author(repository)
|
|
|
|
|
commits_by_author = Changeset.count(:all, :group => :committer, :conditions => ["repository_id = ?", repository.id])
|
|
|
|
|
commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}
|
|
|
|
|
commits_by_author = commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}.last(25)
|
|
|
|
|
|
|
|
|
|
changes_by_author = Change.count(:all, :group => :committer, :include => :changeset, :conditions => ["#{Changeset.table_name}.repository_id = ?", repository.id])
|
|
|
|
|
h = changes_by_author.inject({}) {|o, i| o[i.first] = i.last; o}
|
|
|
|
@ -582,7 +591,7 @@ update
|
|
|
|
|
:fields => fields,
|
|
|
|
|
:stack => :side,
|
|
|
|
|
:scale_integers => true,
|
|
|
|
|
:show_data_values => false,
|
|
|
|
|
:show_data_values => true,
|
|
|
|
|
:rotate_y_labels => false,
|
|
|
|
|
:graph_title => l(:label_commits_per_author),
|
|
|
|
|
:show_graph_title => true
|
|
|
|
|