Skip to content

Commit a429dba

Browse files
author
Gusted
committed
Merge pull request '[v9.0/forgejo] fix: support www.github.com` for migrations' (go-gitea#5800) from bp-v9.0/forgejo-284ffe4 into v9.0/forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5800 Reviewed-by: Michael Kriese <[email protected]>
2 parents d96cef1 + 0c0fd33 commit a429dba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/migrations/github.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ func (f *GithubDownloaderV3Factory) New(ctx context.Context, opts base.MigrateOp
4545
return nil, err
4646
}
4747

48+
// some users are using the github redirect url for migration
49+
if u.Host == "www.github.com" {
50+
u.Host = "github.com"
51+
}
52+
4853
baseURL := u.Scheme + "://" + u.Host
4954
fields := strings.Split(u.Path, "/")
5055
oldOwner := fields[1]

0 commit comments

Comments
 (0)