diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 461ad42ac7..dd119868e9 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -281,12 +281,12 @@ const ( PlainGitService // 1 plain git service GithubService // 2 github.com GiteaService // 3 gitea service - ForgejoService // 4 forgejo service - GitlabService // 5 gitlab service - GogsService // 6 gogs service - OneDevService // 7 onedev service - GitBucketService // 8 gitbucket service - CodebaseService // 9 codebase service + GitlabService // 4 gitlab service + GogsService // 5 gogs service + OneDevService // 6 onedev service + GitBucketService // 7 gitbucket service + CodebaseService // 8 codebase service + ForgejoService // 9 forgejo service ) // Name represents the service type's name @@ -302,8 +302,6 @@ func (gt GitServiceType) Title() string { return "GitHub" case GiteaService: return "Gitea" - case ForgejoService: - return "Forgejo" case GitlabService: return "GitLab" case GogsService: @@ -314,6 +312,8 @@ func (gt GitServiceType) Title() string { return "GitBucket" case CodebaseService: return "Codebase" + case ForgejoService: + return "Forgejo" case PlainGitService: return "Git" } diff --git a/services/convert/utils.go b/services/convert/utils.go index cdce60831c..fe35fd2dac 100644 --- a/services/convert/utils.go +++ b/services/convert/utils.go @@ -36,6 +36,8 @@ func ToGitServiceType(value string) structs.GitServiceType { return structs.OneDevService case "gitbucket": return structs.GitBucketService + case "forgejo": + return structs.ForgejoService default: return structs.PlainGitService } diff --git a/services/convert/utils_test.go b/services/convert/utils_test.go index 1ac03a3097..b464d8bb68 100644 --- a/services/convert/utils_test.go +++ b/services/convert/utils_test.go @@ -28,6 +28,8 @@ func TestToGitServiceType(t *testing.T) { typ: "gitlab", enum: 4, }, { typ: "gogs", enum: 5, + }, { + typ: "forgejo", enum: 9, }, { typ: "trash", enum: 1, }} diff --git a/templates/repo/migrate/forgejo.tmpl b/templates/repo/migrate/forgejo.tmpl index dd62e80479..3caadbee15 100644 --- a/templates/repo/migrate/forgejo.tmpl +++ b/templates/repo/migrate/forgejo.tmpl @@ -1,130 +1 @@ -{{template "base/head" .}} -