@@ -11,6 +11,7 @@ import (
1111 "testing"
1212
1313 "github.com/MakeNowJust/heredoc"
14+ "github.com/cli/cli/api"
1415 "github.com/cli/cli/context"
1516 "github.com/cli/cli/git"
1617 "github.com/cli/cli/internal/config"
@@ -873,7 +874,7 @@ func Test_generateCompareURL(t *testing.T) {
873874 {
874875 name : "basic" ,
875876 ctx : CreateContext {
876- BaseRepo : ghrepo . New ( " OWNER" , "REPO " ),
877+ BaseRepo : api . InitRepoHostname ( & api. Repository { Name : "REPO" , Owner : api. RepositoryOwner { Login : " OWNER"}} , "github.com " ),
877878 BaseBranch : "main" ,
878879 HeadBranchLabel : "feature" ,
879880 },
@@ -883,7 +884,7 @@ func Test_generateCompareURL(t *testing.T) {
883884 {
884885 name : "with labels" ,
885886 ctx : CreateContext {
886- BaseRepo : ghrepo . New ( " OWNER" , "REPO " ),
887+ BaseRepo : api . InitRepoHostname ( & api. Repository { Name : "REPO" , Owner : api. RepositoryOwner { Login : " OWNER"}} , "github.com " ),
887888 BaseBranch : "a" ,
888889 HeadBranchLabel : "b" ,
889890 },
@@ -896,7 +897,7 @@ func Test_generateCompareURL(t *testing.T) {
896897 {
897898 name : "complex branch names" ,
898899 ctx : CreateContext {
899- BaseRepo : ghrepo . New ( " OWNER" , "REPO " ),
900+ BaseRepo : api . InitRepoHostname ( & api. Repository { Name : "REPO" , Owner : api. RepositoryOwner { Login : " OWNER"}} , "github.com " ),
900901 BaseBranch : "main/trunk" ,
901902 HeadBranchLabel : "owner:feature" ,
902903 },
0 commit comments