Avoid throwing abort in after_create method
What does this MR do and why?
Previously check_repository_absence!
called throw :abort
if it
detected that the repository already existed. However, as discussed in
https://github.com/rails/rails/issues/33192 Rails only supports
throwing this signal in before_
callbacks.
Fix this by raising ActiveRecord::RecordInvalid
if the project
repository already exists. This should avoid "unhandled exception"
errors in RSpec when this issue occurs.
Edited by Stan Hu