Commit 8ddb064b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Prefer user email match when looking for commit author

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 89315311
...@@ -125,7 +125,9 @@ module CommitsHelper ...@@ -125,7 +125,9 @@ module CommitsHelper
source_name source_name
end 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 = { options = {
class: "commit-#{options[:source]}-link has_tooltip", class: "commit-#{options[:source]}-link has_tooltip",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment