Gitea remote support

This commit is contained in:
2024-01-16 14:26:56 -05:00
parent bd354842c0
commit 94bbff6d07
8 changed files with 49 additions and 10 deletions

View File

@ -59,6 +59,9 @@ func initProjectCache(cmd *cobra.Command, args []string) {
func getGiteaRemotes(cmd *cobra.Command) []remote.Remote {
gitRemotes := make([]remote.Remote, 0)
for _, gitea := range conf.Giteas {
if gitea.CloneProto == "" {
gitea.CloneProto = config.DefaultCloneProto
}
giteaRemote, err := gitearemote.NewGiteaRemote(&remote.RemoteInfo{
Ctx: cmd.Context(),
Host: gitea.Host,
@ -92,6 +95,9 @@ func getGitLabRemotes(cmd *cobra.Command) []remote.Remote {
// Load Gitlabs
for _, gl := range conf.Gitlabs {
if gl.CloneProto == "" {
gl.CloneProto = config.DefaultCloneProto
}
gitlabRemote, err := gitlabremote.NewGitlabRemote(&remote.RemoteInfo{
Ctx: cmd.Context(),
Host: gl.Host,