You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules/repository
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>
9 months ago
..
branch.go Make "sync branch" also sync object format and add tests (#30878) 9 months ago
branch_test.go Make "sync branch" also sync object format and add tests (#30878) 9 months ago
collaborator.go Add user blocking (#29028) 11 months ago
collaborator_test.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
commits.go Fix context cache bug & enable context cache for dashabord commits' authors (#26991) 1 year ago
commits_test.go Make offline mode as default to no connect external avatar service by default (#28548) 1 year ago
create.go Add user blocking (#29028) 11 months ago
create_test.go Move createrepository from module to service layer (#26927) 1 year ago
delete.go Even more `db.DefaultContext` refactor (#27352) 1 year ago
env.go Move database operations of merging a pull request to post receive hook and add a transaction (#30805) 9 months ago
fork.go Reduce usage of `db.DefaultContext` (#27073) 1 year ago
hooks.go Always write proc-receive hook for all git versions (#29287) 12 months ago
init.go Move generate from module to service (#29465) 11 months ago
init_test.go Make label templates have consistent behavior and priority (#23749) 2 years ago
license.go Move createrepository from module to service layer (#26927) 1 year ago
license_test.go Move createrepository from module to service layer (#26927) 1 year ago
main_test.go make writing main test easier (#27270) 1 year ago
push.go Improve ObjectFormat interface (#28496) 1 year ago
repo.go Move migration functions to services layer (#29497) 11 months ago
repo_test.go Don't remove all mirror repository's releases when mirroring (#28817) 1 year ago
temp.go Enable more `revive` linter rules (#30608) 9 months ago