1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-05-02 21:48:10 +00:00
gitea/models
Lunny Xiao a100ac3306
Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed ()
Fix  

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.
2025-04-07 22:12:54 -07:00
..
actions Enable addtional linters () 2025-04-01 10:14:01 +00:00
activities Enable addtional linters () 2025-04-01 10:14:01 +00:00
admin Fix omitempty bug () 2025-02-20 12:39:21 -08:00
asymkey Move ParseCommitWithSSHSignature to service layer () 2025-04-01 16:30:53 +00:00
auth Add new CLI flags to set name and scopes when creating a user with access token () 2025-04-02 22:00:54 +08:00
avatars Replace 10 more gt- classes with tw- () 2024-03-22 13:45:10 +00:00
db Enable addtional linters () 2025-04-01 10:14:01 +00:00
dbfs Enable testifylint rules () 2025-03-31 01:53:48 -04:00
fixtures Refactor Branch struct in package modules/git () 2025-04-02 17:31:32 +00:00
git Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed () 2025-04-07 22:12:54 -07:00
issues Fix team permission () 2025-04-08 04:15:15 +00:00
migrations Enable addtional linters () 2025-04-01 10:14:01 +00:00
organization Fix team permission () 2025-04-08 04:15:15 +00:00
packages Enable addtional linters () 2025-04-01 10:14:01 +00:00
perm Fix team permission () 2025-04-08 04:15:15 +00:00
project Enable addtional linters () 2025-04-01 10:14:01 +00:00
pull Automerge supports deleting branch automatically after merging () 2025-01-10 03:51:03 +08:00
renderhelper Fix markdown render behaviors () 2025-04-05 11:56:48 +08:00
repo Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed () 2025-04-07 22:12:54 -07:00
secret Added Description Field for Secrets and Variables () 2025-03-17 19:24:54 +00:00
shared/types Refactor locale&string&template related code () 2024-02-14 21:48:45 +00:00
system Enable testifylint rules () 2025-03-31 01:53:48 -04:00
unit Fix team permission () 2025-04-08 04:15:15 +00:00
unittest Enable addtional linters () 2025-04-01 10:14:01 +00:00
user Return default avatar url when user id is zero rather than updating database () 2025-04-02 01:03:27 +00:00
webhook Enable testifylint rules () 2025-03-31 01:53:48 -04:00
main_test.go make writing main test easier () 2023-09-28 01:38:53 +00:00
repo_test.go Enable testifylint rules () 2025-03-31 01:53:48 -04:00
repo.go Fix issue comment number () 2024-12-30 14:35:46 -08:00