aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/create_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused param `doer` (#34545)Philip Peterson2025-06-181-1/+1
|
* Fix bug when migrating repository (#34182)Lunny Xiao2025-04-141-2/+2
| | | This PR fixed a bug which is a regression from #31035
* Rework create/fork/adopt/generate repository to make sure resources will be ↵Lunny Xiao2025-04-071-0/+57
| | | | | | | | | | | | | | | | | | | cleanup once failed (#31035) Fix #28144 To make the resources will be cleanup once failed. All repository operations now follow a consistent pattern: - 1. Create a database record for the repository with the status being_migrated. - 2. Register a deferred cleanup function to delete the repository and its related data if the operation fails. - 3. Perform the actual Git and database operations step by step. - 4. Upon successful completion, update the repository’s status to ready. The adopt operation is a special case — if it fails, the repository on disk should not be deleted.
* Move team related functions to service layer (#32537)Lunny Xiao2024-11-271-148/+0
| | | | | There are still some functions under `models` after last big refactor about `models`. This change will move all team related functions to service layer with no code change.
* bump to use go 1.22 (#29119)techknowlogick2024-02-141-19/+19
|
* Remove unnecessary parameter (#27671)Lunny Xiao2023-10-181-2/+2
|
* Even more `db.DefaultContext` refactor (#27352)JakobDev2023-10-031-1/+1
| | | | | | | | Part of #27065 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: delvh <dev.lh@web.de>
* More refactoring of `db.DefaultContext` (#27083)JakobDev2023-09-151-1/+1
| | | Next step of #27065
* Reduce usage of `db.DefaultContext` (#27073)JakobDev2023-09-141-2/+2
| | | | | | | | | | | | | | Part of #27065 This reduces the usage of `db.DefaultContext`. I think I've got enough files for the first PR. When this is merged, I will continue working on this. Considering how many files this PR affect, I hope it won't take to long to merge, so I don't end up in the merge conflict hell. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* move repository deletion to service layer (#26948)Lunny Xiao2023-09-081-5/+5
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Move createrepository from module to service layer (#26927)Lunny Xiao2023-09-061-0/+148
Repository creation depends on many models, so moving it to service layer is better.