@@ -88,9 +88,9 @@ func getCommit(ctx context.Context, account, repo, ref string) (string, error) {
8888 return commit .SHA , nil
8989}
9090
91- func Load (ctx context.Context , _ * cache.Client , urlName string ) (string , * types.Repo , bool , error ) {
91+ func Load (ctx context.Context , _ * cache.Client , urlName string ) (string , string , * types.Repo , bool , error ) {
9292 if ! strings .HasPrefix (urlName , GithubPrefix ) {
93- return "" , nil , false , nil
93+ return "" , "" , nil , false , nil
9494 }
9595
9696 url , ref , _ := strings .Cut (urlName , "@" )
@@ -101,15 +101,15 @@ func Load(ctx context.Context, _ *cache.Client, urlName string) (string, *types.
101101 parts := strings .Split (url , "/" )
102102 // Must be at least 3 parts github.com/ACCOUNT/REPO[/FILE]
103103 if len (parts ) < 3 {
104- return "" , nil , false , nil
104+ return "" , "" , nil , false , nil
105105 }
106106
107107 account , repo := parts [1 ], parts [2 ]
108108 path := strings .Join (parts [3 :], "/" )
109109
110110 ref , err := getCommit (ctx , account , repo , ref )
111111 if err != nil {
112- return "" , nil , false , err
112+ return "" , "" , nil , false , err
113113 }
114114
115115 downloadURL := fmt .Sprintf (githubDownloadURL , account , repo , ref , path )
@@ -141,7 +141,7 @@ func Load(ctx context.Context, _ *cache.Client, urlName string) (string, *types.
141141 path = testPath
142142 }
143143
144- return downloadURL , & types.Repo {
144+ return downloadURL , githubAuthToken , & types.Repo {
145145 VCS : "git" ,
146146 Root : fmt .Sprintf (githubRepoURL , account , repo ),
147147 Path : gpath .Dir (path ),
0 commit comments