Skip to content
Snippets Groups Projects
Unverified Commit 8ddb064b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Prefer user email match when looking for commit author

parent 89315311
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment