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
..
2024-02-25 13:32:13 +00:00
2024-03-21 15:07:35 +00:00
2024-04-03 02:16:46 +00:00
2024-05-01 15:32:52 +03:00
2023-02-11 08:39:50 +08:00
2023-12-25 20:13:18 +08:00
2024-04-22 23:55:43 +00:00
2024-02-25 13:32:13 +00:00
2024-05-03 09:13:48 +00:00
2022-12-30 23:31:00 +08:00
2023-11-03 15:21:05 +00:00
2024-04-21 00:53:45 +00:00
2024-01-12 21:50:38 +00:00