Skip to content

Commit 0c0fd33

Browse files
viceiceforgejo-backport-action
authored andcommitted
fix: support www.github.com` for migrations
(cherry picked from commit 284ffe4)
1 parent d96cef1 commit 0c0fd33

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)