forked from JonasFranzDEV/gitea-github-migrator
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
520 B
23 lines
520 B
6 years ago
|
package migrations
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"code.gitea.io/sdk/gitea"
|
||
|
"github.com/google/go-github/github"
|
||
|
)
|
||
|
|
||
|
func (m *Migratory) Repository(gr *github.Repository) (*gitea.Repository, error) {
|
||
|
var err error
|
||
|
m.repository, err = m.Client.MigrateRepo(gitea.MigrateRepoOption{
|
||
|
Description: *gr.Description,
|
||
|
AuthPassword: m.AuthPassword,
|
||
|
AuthUsername: m.AuthUsername,
|
||
|
CloneAddr: gr.GetCloneURL(),
|
||
|
RepoName: gr.GetName(),
|
||
|
UID: m.NewOwnerID,
|
||
|
Private: m.Private,
|
||
|
})
|
||
|
return m.repository, err
|
||
|
}
|