Merge pull request '[v9.0/forgejo] fix: support `www.github.com` for migrations' (#5800) from bp-v9.0/forgejo-284ffe4 into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5800 Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
This commit is contained in:
commit
a429dbad98
|
@ -45,6 +45,11 @@ func (f *GithubDownloaderV3Factory) New(ctx context.Context, opts base.MigrateOp
|
||||||
return nil, err
|
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
|
baseURL := u.Scheme + "://" + u.Host
|
||||||
fields := strings.Split(u.Path, "/")
|
fields := strings.Split(u.Path, "/")
|
||||||
oldOwner := fields[1]
|
oldOwner := fields[1]
|
||||||
|
|
Loading…
Reference in New Issue