1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-21 08:31:27 -05:00

fix: support www.github.com for migrations

This commit is contained in:
Michael Kriese 2024-11-03 14:47:05 +01:00
parent 20c0a2a381
commit 284ffe4e00
No known key found for this signature in database
GPG key ID: F8D7748549A5986A

View file

@ -45,6 +45,11 @@ func (f *GithubDownloaderV3Factory) New(ctx context.Context, opts base.MigrateOp
return nil, err
}
// some users are using the github redirect url for migration
if u.Host == "www.github.com" {
u.Host = "github.com"
}
baseURL := u.Scheme + "://" + u.Host
fields := strings.Split(u.Path, "/")
oldOwner := fields[1]