forgejo/services/migrations/forgejo_downloader.go
Earl Warren 51938cd161
[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
2023-12-05 19:42:02 +01:00

21 lines
391 B
Go

// 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
}