mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	* On Migration respect old DefaultBranch * add DefaultBranch int test set Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		| @@ -154,14 +154,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 | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user