gitea/services
Lunny Xiao a100ac3306
Rework create/fork/adopt/generate repository to make sure resources will be 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.
2025-04-07 22:12:54 -07:00
..
actions Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
agit Move git references checking to gitrepo packages to reduce expose of repository path (#33891) 2025-03-15 19:48:59 -07:00
asymkey Move ParseCommitWithSSHSignature to service layer (#34087) 2025-04-01 16:30:53 +00:00
attachment Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
auth Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
automerge Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
context Fix team permission (#34128) 2025-04-08 04:15:15 +00:00
contexttest Add file tree to file view page (#32721) 2025-03-15 16:26:49 +08:00
convert Refactor Branch struct in package modules/git (#33980) 2025-04-02 17:31:32 +00:00
cron Use default Git timeout when checking repo health (#33593) 2025-02-14 15:13:56 +00:00
doctor Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
externalaccount Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
feed Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
forms Add anonymous access support for private/unlisted repositories (#34051) 2025-03-29 13:26:41 +08:00
git Move commits signature and verify functions to service layers (#33605) 2025-02-16 12:24:07 +00:00
gitdiff Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
indexer Update issue indexer after merging a PR (#30715) 2024-05-08 14:45:15 +00:00
issue Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
lfs Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
mailer Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
markup Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
migrations Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
mirror Refactor Branch struct in package modules/git (#33980) 2025-04-02 17:31:32 +00:00
notify Add workflow_job webhook (#33694) 2025-03-11 10:40:38 -07:00
oauth2_provider Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
org Fix team permission (#34128) 2025-04-08 04:15:15 +00:00
packages Fix invalid version in RPM package path (#34112) 2025-04-03 19:00:00 +00:00
projects Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
pull Refactor Branch struct in package modules/git (#33980) 2025-04-02 17:31:32 +00:00
release Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
repository Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed (#31035) 2025-04-07 22:12:54 -07:00
secrets Added Description Field for Secrets and Variables (#33526) 2025-03-17 19:24:54 +00:00
task Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
uinotification Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
user Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
versioned_migration Add global lock for migrations to make upgrade more safe with multiple replications (#33706) 2025-03-07 21:08:53 +00:00
webhook Fix discord webhook 400 status code when description limit is exceeded (#34084) 2025-04-04 18:09:40 +00:00
webtheme Improve theme display (#30671) 2025-03-08 21:38:11 +00:00
wiki Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00