Fix bug when importing snippets and creating repository content
Implementing the snippet migration we discovered several edges cases that we had to fix in order to run a successful migration. Some of these edge cases were related to:
- what to do when the file path is invalid
- deal when the file path is blank
- deal when the user has not enough rights to commits the data.
Nevertheless, during a project import, when we try to import the project snippets and the git bundle is not created we just call repository.create_file
. This is not enough since it doesn't cover all those edge cases.
We can fix that by calling the same class the migration does.