A tool to migrate GitHub Repositories to Gitea including all issues
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
gitea-github-migrator/migrations/repo.go

21 rader
616 B

package migrations
import (
"code.gitea.io/sdk/gitea"
"github.com/google/go-github/github"
)
// Repository migrates a GitHub Repository to a Gitea Repository without migrating issues etc.
func (m *Migratory) Repository(gr *github.Repository) (*gitea.Repository, error) {
var err error
m.repository, err = m.Client.MigrateRepo(gitea.MigrateRepoOption{
Description: gr.GetDescription(),
AuthPassword: m.AuthPassword,
AuthUsername: m.AuthUsername,
CloneAddr: gr.GetCloneURL(),
RepoName: gr.GetName(),
UID: int(m.NewOwnerID),
Private: m.Private,
})
return m.repository, err
}