diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-09-10 02:29:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 14:29:10 -0400 |
commit | e153cf07c34b1497906348df84a556851693c77f (patch) | |
tree | 79c642c2d04a907b0700c369108825d0b53085b9 /modules/structs/repo.go | |
parent | 6483dbc8ec780dda22e21b605d1dc409826baff1 (diff) | |
download | gitea-e153cf07c34b1497906348df84a556851693c77f.tar.gz gitea-e153cf07c34b1497906348df84a556851693c77f.zip |
Add a migrate service type switch page (#12697)
* Add a migrat service type switch page
* Improve translations
* remove images
* Fix images
* remove extra create repo button on dashboard
* Follow reviewers' opinions
* Fix frontend lint
* Remove wrong submit file
* Fix tests
* Adjust the size of image
* Apply suggestions from code review
Co-authored-by: 赵智超 <1012112796@qq.com>
* Remove username and password from migration of github/gitlab
* Improve docs
* Improve interface docs
Co-authored-by: 赵智超 <1012112796@qq.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/structs/repo.go')
-rw-r--r-- | modules/structs/repo.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 808d2ffbc8..f751c00789 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -5,6 +5,7 @@ package structs import ( + "strings" "time" ) @@ -205,17 +206,7 @@ const ( // Name represents the service type's name // WARNNING: the name have to be equal to that on goth's library func (gt GitServiceType) Name() string { - switch gt { - case GithubService: - return "github" - case GiteaService: - return "gitea" - case GitlabService: - return "gitlab" - case GogsService: - return "gogs" - } - return "" + return strings.ToLower(gt.Title()) } // Title represents the service type's proper title |