0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-28 02:14:06 -05:00
forgejo/services/migrations
Sebastian Brückner f0acc71ba1
Properly migrate target branch change GitLab comment (#29340)
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 a new specific kind of event: Changing the
target branch of a PR. When detected, it is downloaded using Gitea's
type for this event, 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 this type.

ref:
11bd6dc826/app/services/system_notes/merge_requests_service.rb (L102)
(cherry picked from commit 6e5966597c2d498d1a8540dad965461d44ff8e57)
2024-02-26 22:30:26 +01:00
..
testdata/gitlab [GITEA] Avoid conflicts of issue and PR numbers in GitLab migration (#1790) 2024-02-05 16:09:41 +01:00
codebase.go
codebase_test.go
common.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
dump.go
error.go Bump google/go-github to v57 (#28514) 2023-12-18 15:42:04 -06:00
forgejo_downloader.go [BRANDING] add Forgejo Git Service and migration UI 2024-02-05 16:05:02 +01:00
forgejo_downloader_test.go [BRANDING] add Forgejo Git Service and migration UI 2024-02-05 16:05:02 +01:00
git.go
gitbucket.go
gitea_downloader.go Fix DownloadFunc when migrating releases (#27887) 2023-11-03 15:56:53 +08:00
gitea_downloader_test.go
gitea_uploader.go Properly migrate target branch change GitLab comment (#29340) 2024-02-26 22:30:26 +01:00
gitea_uploader_test.go [TESTS] add log.Level to test.NewLogChecker 2024-02-05 16:54:44 +01:00
github.go Bump google/go-github to v57 (#28514) 2023-12-18 15:42:04 -06:00
github_test.go
gitlab.go Properly migrate target branch change GitLab comment (#29340) 2024-02-26 22:30:26 +01:00
gitlab_test.go Properly migrate target branch change GitLab comment (#29340) 2024-02-26 22:30:26 +01:00
gogs.go
gogs_test.go
http_client.go
main_test.go
migrate.go [BRANDING] add Forgejo Git Service and migration UI 2024-02-05 16:05:02 +01:00
migrate_test.go
onedev.go
onedev_test.go
restore.go
update.go Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00