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/migrations
Sebastian Brückner a70c00b80b
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>
12 months ago
..
codebase.go Replace `interface{}` with `any` (#25686) 2 years ago
codebase_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
common.go Adjust object format interface (#28469) 1 year ago
dump.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
error.go Bump google/go-github to v57 (#28514) 1 year ago
git.go Implement FSFE REUSE for golang files (#21840) 2 years ago
gitbucket.go Rewrite logger system (#24726) 2 years ago
gitea_downloader.go Fix DownloadFunc when migrating releases (#27887) 1 year ago
gitea_downloader_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
gitea_uploader.go Properly migrate automatic merge GitLab comments (#27873) 12 months ago
gitea_uploader_test.go Simplify how git repositories are opened (#28937) 1 year ago
github.go Bump google/go-github to v57 (#28514) 1 year ago
github_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
gitlab.go Properly migrate automatic merge GitLab comments (#27873) 12 months ago
gitlab_test.go Properly migrate automatic merge GitLab comments (#27873) 12 months ago
gogs.go Rewrite logger system (#24726) 2 years ago
gogs_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
http_client.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go make writing main test easier (#27270) 1 year ago
migrate.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
migrate_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
onedev.go Replace `interface{}` with `any` (#25686) 2 years ago
onedev_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
restore.go Implement FSFE REUSE for golang files (#21840) 2 years ago
update.go Use db.Find instead of writing methods for every object (#28084) 1 year ago