mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 20:01:24 +01:00
[FEAT] add Forgejo Git Service (squash) register a Forgejo factory
If the Forgejo factory for the Forgejo service is not registered, newDownloader will fallback to a git service and not migrate issues etc. Refs: https://codeberg.org/forgejo/forgejo/issues/1678 (cherry picked from commit 2ecb2558be696965a49b543d5e843526c105e07a) Do not include tests so it is kept minimal.
This commit is contained in:
parent
69221d84cf
commit
61fc5c514a
1 changed files with 20 additions and 0 deletions
20
services/migrations/forgejo_downloader.go
Normal file
20
services/migrations/forgejo_downloader.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2023 The Forgejo Authors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package migrations
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/modules/structs"
|
||||
)
|
||||
|
||||
func init() {
|
||||
RegisterDownloaderFactory(&ForgejoDownloaderFactory{})
|
||||
}
|
||||
|
||||
type ForgejoDownloaderFactory struct {
|
||||
GiteaDownloaderFactory
|
||||
}
|
||||
|
||||
func (f *ForgejoDownloaderFactory) GitServiceType() structs.GitServiceType {
|
||||
return structs.ForgejoService
|
||||
}
|
Loading…
Reference in a new issue