forgejo/services
Sebastian Brückner 542badbb76
Properly migrate automatic merge GitLab comments (#27873)
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>
(cherry picked from commit a70c00b80bcb5de8479e407f1b8f08dcf756019d)
2024-02-26 22:30:26 +01:00
..
actions Expire artifacts before deleting them physically (#29241) 2024-02-23 09:06:14 +01:00
agit [FEAT] Check if commit is already present in target branch 2024-02-23 21:42:15 +01:00
asymkey
attachment [FEAT] allow setting the update date on issues and comments 2024-02-05 14:44:33 +01:00
auth Fix c/p error in inline documentation (#29148) 2024-02-19 22:58:33 +01:00
automerge
context
convert Add merge style fast-forward-only (#28954) 2024-02-14 17:19:19 +01:00
cron Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
doctor [GITEA] new doctor check: fix-push-mirrors-without-git-remote (#1853) 2024-02-05 16:09:41 +01:00
externalaccount
feed
forgejo [UPGRADE] run sanity checks before the database is upgraded 2024-02-05 14:44:33 +01:00
forms Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
gitdiff [FEAT] Enable ambiguous character detection in configured contexts 2024-02-23 13:12:17 +01:00
indexer
issue Merge remote-tracking branch 'forgejo/forgejo-dependency' into wip-forgejo 2024-02-09 19:00:54 +01:00
lfs [GITEA] Drop sha256-simd in favor of stdlib 2024-02-05 16:09:40 +01:00
mailer Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
markup
migrations Properly migrate automatic merge GitLab comments (#27873) 2024-02-26 22:30:26 +01:00
mirror
notify [GITEA] notifies admins on new user registration 2024-02-05 16:09:28 +01:00
org
packages Port "Use general token signing secret" 2024-02-19 20:49:37 +01:00
pull Disallow merge when required checked are missing (#29143) 2024-02-19 22:58:33 +01:00
release
repository Fix content size does not match error when uploading lfs file (#29259) 2024-02-26 21:42:14 +01:00
secrets
task
uinotification
user Remove unused KeyID. (#29167) 2024-02-16 15:20:52 +01:00
webhook Merge branch 'rebase-forgejo-dependency' into wip-forgejo 2024-02-05 18:58:23 +01:00
wiki [GITEA] Allow changing the repo Wiki branch to main 2024-02-05 16:57:47 +01:00