* test -x is not enough https://stackoverflow.com/a/39489087
Move more general repository functions out of models/repo.go