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/services
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>
10 months ago
..
actions feat(api): enhance Actions Secrets Management API for repository (#30656) 10 months ago
agit Performance optimization for git push (#30104) 11 months ago
asymkey Fix some pending problems (#29985) 11 months ago
attachment Add support for API blob upload of release attachments (#29507) 12 months ago
auth Fix tautological conditions (#30735) 10 months ago
automerge Simplify how git repositories are opened (#28937) 1 year ago
context Ignore useless error message "broken pipe" (#30801) 10 months ago
contexttest Move database operations of merging a pull request to post receive hook and add a transaction (#30805) 10 months ago
convert Add API endpoints for getting action jobs status (#26673) 10 months ago
cron Move some asymkey functions to service layer (#28894) 12 months ago
doctor Resolve lint for unused parameter and unnecessary type arguments (#30750) 10 months ago
externalaccount Revert "Support SAML authentication (#25165)" (#29358) 1 year ago
feed More `db.DefaultContext` refactor (#27265) 1 year ago
forms Initial support for colorblindness-friendly themes (#30625) 10 months ago
gitdiff Make sure git version&feature are always prepared (#30877) 10 months ago
indexer Fix missing issue search index update when changing status (#28325) 1 year ago
issue Update misspell to 0.5.1 and add `misspellings.csv` (#30573) 10 months ago
lfs Move context from modules to services (#29440) 1 year ago
mailer Fix incorrect message id for releaes email (#30825) 10 months ago
markup Enable more `revive` linter rules (#30608) 10 months ago
migrations Resolve lint for unused parameter and unnecessary type arguments (#30750) 10 months ago
mirror Resolve lint for unused parameter and unnecessary type arguments (#30750) 10 months ago
notify Clean up log messages (#30313) 11 months ago
org Update misspell to 0.5.1 and add `misspellings.csv` (#30573) 10 months ago
packages remove util.OptionalBool and related functions (#29513) 12 months ago
pull Move database operations of merging a pull request to post receive hook and add a transaction (#30805) 10 months ago
release Use repo object format name instead of detecting from git repository (#29702) 12 months ago
repository Make "sync branch" also sync object format and add tests (#30878) 10 months ago
secrets Refactor deletion (#28610) 1 year ago
task Fix incorrect ctx usage in defer function (#27740) 1 year ago
uinotification Penultimate round of `db.DefaultContext` refactor (#27414) 1 year ago
user Resolve lint for unused parameter and unnecessary type arguments (#30750) 10 months ago
webhook Enable more `revive` linter rules (#30608) 10 months ago
webtheme Initial support for colorblindness-friendly themes (#30625) 10 months ago
wiki Avoid showing `Failed to change the default wiki branch` if repo has no wiki when saving repo settings (#30329) 11 months ago