#971 fix commit link

This commit is contained in:
Alexander Machehin 2013-02-26 18:32:35 +06:00
parent cf7f3cb24c
commit acd179d1a8
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ class ActivityFeedObserver < ActiveRecord::Observer
change_type = record.change_type
branch_name = record.refname.split('/').last
if record.user # online update
last_commits, first_commiter = [[record.newrev, record.message]], record.user
last_commits, first_commiter = [[record.oldrev, record.message]], record.user
else
last_commits = record.project.repo.log(branch_name, nil).first(3)
first_commiter = User.find_by_email(last_commits[0].author.email) unless last_commits.blank?

View File

@ -57,7 +57,7 @@ module Modules
index.add(path, data)
if sha1 = index.commit(message, :parents => [parent], :actor => actor, :last_tree => parent.tree.id, :head => head)
Project.process_hook(owner.uname, name, "refs/heads/#{sha1}", nil, head, 'commit', 'commit', options[:actor], message)
Project.process_hook(owner.uname, name, "refs/heads/#{sha1}", sha1, head, 'commit', 'commit', options[:actor], message)
end
sha1
end