aboutsummaryrefslogtreecommitdiffstats
path: root/modules/migrations/github.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/migrations/github.go')
-rw-r--r--modules/migrations/github.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/migrations/github.go b/modules/migrations/github.go
index e5cc3b8223..d31db136e6 100644
--- a/modules/migrations/github.go
+++ b/modules/migrations/github.go
@@ -143,14 +143,20 @@ func (g *GithubDownloaderV3) GetRepoInfo() (*base.Repository, error) {
}
g.rate = &resp.Rate
+ defaultBranch := ""
+ if gr.DefaultBranch != nil {
+ defaultBranch = *gr.DefaultBranch
+ }
+
// convert github repo to stand Repo
return &base.Repository{
- Owner: g.repoOwner,
- Name: gr.GetName(),
- IsPrivate: *gr.Private,
- Description: gr.GetDescription(),
- OriginalURL: gr.GetHTMLURL(),
- CloneURL: gr.GetCloneURL(),
+ Owner: g.repoOwner,
+ Name: gr.GetName(),
+ IsPrivate: *gr.Private,
+ Description: gr.GetDescription(),
+ OriginalURL: gr.GetHTMLURL(),
+ CloneURL: gr.GetCloneURL(),
+ DefaultBranch: defaultBranch,
}, nil
}