1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00
gitea/services
Sebastian Brückner a70c00b80b
Properly migrate automatic merge GitLab comments ()
GitLab generates "system notes" whenever an event happens within the
platform. Unlike Gitea, those events are stored and retrieved as text
comments with no semantic details. The only way to tell whether a
comment was generated in this manner is the `system` flag on the note
type.

This PR adds detection for two specific kinds of events: Scheduling and
un-scheduling of automatic merges on a PR. When detected, they are
downloaded using Gitea's type for these events, and eventually uploaded
into Gitea in the expected format, i.e. with no text content in the
comment.

This PR also updates the template used to render comments to add support
for migrated comments of these two types.

ref:
11bd6dc826/app/services/system_notes/merge_requests_service.rb (L6-L17)

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-02-22 07:29:03 +00:00
..
actions Show commit status for releases () 2024-02-19 10:27:05 +00:00
agit small cache when get user id on interation () 2024-02-22 13:31:37 +08:00
asymkey Simplify how git repositories are opened () 2024-01-27 21:09:51 +01:00
attachment Even more db.DefaultContext refactor () 2023-10-03 10:30:41 +00:00
auth Fix c/p error in inline documentation () 2024-02-19 10:51:58 +00:00
automerge Simplify how git repositories are opened () 2024-01-27 21:09:51 +01:00
context Another round of db.DefaultContext refactor () 2023-09-25 13:17:37 +00:00
convert Add merge style fast-forward-only () 2024-02-12 23:37:23 +01:00
cron Refactor locale&string&template related code () 2024-02-14 21:48:45 +00:00
doctor Simplify how git repositories are opened () 2024-01-27 21:09:51 +01:00
externalaccount Final round of db.DefaultContext refactor () 2023-10-14 08:37:24 +00:00
feed More db.DefaultContext refactor () 2023-09-29 12:12:54 +00:00
forms Refactor locale&string&template related code () 2024-02-14 21:48:45 +00:00
gitdiff Add option to disable ambiguous unicode characters detection () 2023-12-17 14:38:54 +00:00
indexer Fix missing issue search index update when changing status () 2023-12-03 12:22:44 +01:00
issue Refactor issue template parsing and fix API endpoint () 2024-02-12 05:04:10 +00:00
lfs Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods () 2023-12-07 15:27:36 +08:00
mailer Refactor locale&string&template related code () 2024-02-14 21:48:45 +00:00
markup make writing main test easier () 2023-09-28 01:38:53 +00:00
migrations Properly migrate automatic merge GitLab comments () 2024-02-22 07:29:03 +00:00
mirror Simplify how git repositories are opened () 2024-01-27 21:09:51 +01:00
notify Update status and code index after changing the default branch () 2023-09-13 04:43:31 +00:00
org Delete repos of org when purge delete user () 2023-10-19 13:16:11 +00:00
packages Use general token signing secret () 2024-02-18 17:39:04 +00:00
pull Disallow merge when required checked are missing () 2024-02-19 09:57:08 +00:00
release Avoid sending update/delete release notice when it is draft () 2024-02-02 04:18:12 +00:00
repository Fix content size does not match error when uploading lfs file () 2024-02-19 14:50:03 +00:00
secrets Refactor deletion () 2023-12-25 21:25:29 +01:00
task Fix incorrect ctx usage in defer function () 2023-10-22 14:12:27 +00:00
uinotification Penultimate round of db.DefaultContext refactor () 2023-10-11 04:24:07 +00:00
user Unify password changing and invalidate auth tokens () 2024-02-04 14:05:26 +00:00
webhook Abstract hash function usage () 2023-12-13 21:02:00 +00:00
wiki Fix an actions schedule bug () 2024-01-31 14:55:12 +00:00