Prefer user email match when looking for commit author
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
893153113d
commit
8ddb064bbd
|
@ -125,7 +125,9 @@ module CommitsHelper
|
|||
source_name
|
||||
end
|
||||
|
||||
user = User.where('name like ? or email like ?', source_name, source_email).first
|
||||
# Prefer email match over name match
|
||||
user = User.where(email: source_email).first
|
||||
user ||= User.where(name: source_name).first
|
||||
|
||||
options = {
|
||||
class: "commit-#{options[:source]}-link has_tooltip",
|
||||
|
|
Loading…
Reference in New Issue