monterail / ghcr-api

GitHub Code Review API
https://github.com/monterail/ghcr-api
MIT License
7 stars 2 forks source link

Not uniq usernames! #10

Closed chytreg closed 10 years ago

chytreg commented 10 years ago

We have some duplication of users. User.group(:username).having("COUNT(*) > 1").count { "thion"=>2, "Ostrzy"=>2, "szymo"=>2, "jandudulski"=>2, "michlask"=>2, "venticco"=>2, "tallica"=>2, "proapi"=>2 }

The problems is how we create the users. We missed the case that github users can have multiple emails and the emails form commits could be wrong.

We should take precedence of creating user by username not by email and introduce multiple emails support for user.

chytreg commented 10 years ago

This should resolve the problem https://github.com/monterail/ghcr-api/compare/127e780c82^...master

and https://gist.github.com/chytreg/87cef9fcf5d3e5e1db5c