From 459d708d27ab287862fe7d533bc3e978a15e65b7 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 21 Jul 2023 05:25:23 -0400 Subject: [PATCH] Adding remaining enum for migration repo model type. (#26021) (#26033) Backport #26021 by @puni9869 Fixes: https://github.com/go-gitea/gitea/issues/26010 Adding remaining enum for migration repo model type. Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com> (cherry picked from commit 81f5d5b7229847cd4f07930733a55e9d45946c7d) --- modules/structs/repo.go | 2 +- templates/swagger/v1_json.tmpl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/structs/repo.go b/modules/structs/repo.go index b5a26a8155..d69eb3b5bd 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -311,7 +311,7 @@ type MigrateRepoOptions struct { // required: true RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"` - // enum: git,github,gitea,gitlab + // enum: git,github,gitea,gitlab,gogs,onedev,gitbucket,codebase Service string `json:"service"` AuthUsername string `json:"auth_username"` AuthPassword string `json:"auth_password"` diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index cf8bf22d66..a74525417a 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -17829,7 +17829,11 @@ "git", "github", "gitea", - "gitlab" + "gitlab", + "gogs", + "onedev", + "gitbucket", + "codebase" ], "x-go-name": "Service" },