Commit Graph
4 Commits
Author SHA1 Message Date
de2268ffab Fix issue attachment handling (#24202)
Close #24195

Some of the changes are taken from my another fix
https://github.com/go-gitea/gitea/pull/20147/commits/f07b0de997125c9b79cc5af27966a7cdd1803a4d
in #20147 (although that PR was discarded ....)


The bug is:

1. The old code doesn't handle `removedfile` event correctly
2. The old code doesn't provide attachments for type=CommentTypeReview


This PR doesn't intend to refactor the "upload" code to a perfect state
(to avoid making the review difficult), so some legacy styles are kept.

---------

Co-authored-by: silverwind <[email protected]>
Co-authored-by: Giteabot <[email protected]>
2023-04-20 02:39:44 -04:00
wxiaoguangandGitHub cfe3d6e9b5 Make more functions use ctx instead of db.DefaultContext (#24068)
Continue the "ctx refactoring" work.

There are still a lot db.DefaultContext, incorrect context could cause
database deadlock errors.
2023-04-14 14:18:28 -04:00
Jason SongandGitHub 6135359a04 Always reuse transaction (#22362) 2023-01-08 09:34:58 +08:00
Lunny XiaoandGitHub 68704532c2 Rename almost all Ctx functions (#22071) 2022-12-10 10:46:31 +08:00