travis-ci/travis-api — pull request #81 by henrikhodne (2013-10-26 13:35:52+00:00)
Title: Handle race condition with creating users more nicely

I looked into adding tests for this, but wasn't quite sure how to best do it. If anyone has suggestions, please let me know.

This should handle the race condition where the user is being created somewhere else sometime between `User.find_by_github_id` and `User.create!`, which throws an error due to the unique contraint on github_id.