gitea/cmd
Lunny Xiao ebf0c96940
Move database operations of merging a pull request to post receive hook and add a transaction (#30805)
Merging PR may fail because of various problems. The pull request may
have a dirty state because there is no transaction when merging a pull
request. ref
https://github.com/go-gitea/gitea/pull/25741#issuecomment-2074126393

This PR moves all database update operations to post-receive handler for
merging a pull request and having a database transaction. That means if
database operations fail, then the git merging will fail, the git client
will get a fail result.

There are already many tests for pull request merging, so we don't need
to add a new one.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-05-07 07:36:48 +00:00
..
actions.go
admin_auth_ldap_test.go
admin_auth_ldap.go
admin_auth_oauth.go chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621) 2024-04-21 19:44:03 +00:00
admin_auth_stmp.go chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621) 2024-04-21 19:44:03 +00:00
admin_auth.go chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621) 2024-04-21 19:44:03 +00:00
admin_regenerate.go Move some asymkey functions to service layer (#28894) 2024-03-04 08:57:39 +00:00
admin_user_change_password.go Add some tests to clarify the "must-change-password" behavior (#30693) 2024-04-27 12:23:37 +00:00
admin_user_create_test.go Add some tests to clarify the "must-change-password" behavior (#30693) 2024-04-27 12:23:37 +00:00
admin_user_create.go Add some tests to clarify the "must-change-password" behavior (#30693) 2024-04-27 12:23:37 +00:00
admin_user_delete.go chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621) 2024-04-21 19:44:03 +00:00
admin_user_generate_access_token.go chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621) 2024-04-21 19:44:03 +00:00
admin_user_list.go
admin_user_must_change_password.go
admin_user.go
admin.go
cert.go
cmd.go
docs.go
doctor_convert.go
doctor_test.go
doctor.go
dump_repo.go
dump.go Add --skip-db option to dump command (#30613) 2024-04-21 23:32:12 +02:00
embedded.go chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621) 2024-04-21 19:44:03 +00:00
generate.go
hook_test.go
hook.go Move database operations of merging a pull request to post receive hook and add a transaction (#30805) 2024-05-07 07:36:48 +00:00
keys.go
mailer.go
main_test.go Add some tests to clarify the "must-change-password" behavior (#30693) 2024-04-27 12:23:37 +00:00
main.go Add some tests to clarify the "must-change-password" behavior (#30693) 2024-04-27 12:23:37 +00:00
manager_logging.go chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621) 2024-04-21 19:44:03 +00:00
manager.go
migrate_storage_test.go
migrate_storage.go Fix missing migrate actions artifacts (#30874) 2024-05-07 06:45:30 +00:00
migrate.go
restore_repo.go
serv.go Make sure git version&feature are always prepared (#30877) 2024-05-06 18:34:16 +02:00
web_acme.go
web_graceful.go
web_https.go
web.go Clean up log messages (#30313) 2024-04-07 19:17:06 +08:00