diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-05-07 15:36:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 07:36:48 +0000 |
commit | ebf0c969403d91ed80745ff5bd7dfbdb08174fc7 (patch) | |
tree | a9d0ab5c6f542258572fdda0b010351ea493169b /modules/markup | |
parent | 6ad77125cabe53a943d46b50e8cb79cfcea5491f (diff) | |
download | gitea-ebf0c969403d91ed80745ff5bd7dfbdb08174fc7.tar.gz gitea-ebf0c969403d91ed80745ff5bd7dfbdb08174fc7.zip |
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>
Diffstat (limited to 'modules/markup')
0 files changed, 0 insertions, 0 deletions