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
codebase_test.go
common.go Adjust object format interface (#28469) 1 year ago
dump.go
error.go Bump google/go-github to v57 (#28514) 1 year ago
git.go
gitbucket.go
gitea_downloader.go Fix DownloadFunc when migrating releases (#27887) 1 year ago
gitea_downloader_test.go
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
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
gogs_test.go
http_client.go
main_test.go make writing main test easier (#27270) 1 year ago
migrate.go
migrate_test.go
onedev.go
onedev_test.go
restore.go
update.go Use db.Find instead of writing methods for every object (#28084) 1 year ago