A tool to migrate GitHub Repositories to Gitea including all issues
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.
 
 
 
gitea-github-migrator/web/migration/repos.go

18 lines
498 B

package migration
import (
"git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/web/context"
"github.com/google/go-github/github"
bgctx "context"
)
// ListRepos shows all available repos of the signed in user
func ListRepos(ctx *context.Context) {
repos, _, err := ctx.Client.Repositories.List(bgctx.Background(), ctx.User.Username, &github.RepositoryListOptions{})
if err != nil {
ctx.Handle(500, "list repositories", err)
}
ctx.Data["Repos"] = repos
ctx.HTML(200, "repos")
}