diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 6a2ba4836b..80df8f2fc2 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -286,6 +286,7 @@ const ( OneDevService // 6 onedev service GitBucketService // 7 gitbucket service CodebaseService // 8 codebase service + ForgejoService // 9 forgejo service ) // Name represents the service type's name @@ -313,6 +314,8 @@ func (gt GitServiceType) Title() string { return "Codebase" case PlainGitService: return "Git" + case ForgejoService: + return "Forgejo" } return "" } @@ -352,7 +355,7 @@ type MigrateRepoOptions struct { // TokenAuth represents whether a service type supports token-based auth func (gt GitServiceType) TokenAuth() bool { switch gt { - case GithubService, GiteaService, GitlabService: + case GithubService, GiteaService, GitlabService, ForgejoService: return true } return false @@ -368,6 +371,7 @@ var SupportedFullGitService = []GitServiceType{ OneDevService, GitBucketService, CodebaseService, + ForgejoService, } // RepoTransfer represents a pending repo transfer diff --git a/templates/repo/migrate/forgejo.tmpl b/templates/repo/migrate/forgejo.tmpl new file mode 100644 index 0000000000..dd62e80479 --- /dev/null +++ b/templates/repo/migrate/forgejo.tmpl @@ -0,0 +1,130 @@ +{{template "base/head" .}} +