File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1158,6 +1158,7 @@ private async Task<JObject> SendRequestAsyncWithPagination(HttpRequestMessage in
11581158 {
11591159 HttpResponseMessage response ;
11601160 string nextUrl = initialMessage . RequestUri . ToString ( ) ;
1161+ string urlBase = initialMessage . RequestUri . Scheme + "://" + initialMessage . RequestUri . Host ;
11611162 JObject finalResult = new JObject ( ) ;
11621163 JArray allRepositories = new JArray ( ) ;
11631164
@@ -1198,7 +1199,15 @@ private async Task<JObject> SendRequestAsyncWithPagination(HttpRequestMessage in
11981199 {
11991200 var linkHeader = string . Join ( "," , linkHeaders ) ;
12001201 var match = Regex . Match ( linkHeader , @"<([^>]+)>;\s*rel=""next""" ) ;
1201- nextUrl = match . Success ? match . Groups [ 1 ] . Value : null ;
1202+ var nextUrlPart = match . Success ? match . Groups [ 1 ] . Value : null ;
1203+ if ( ! string . IsNullOrEmpty ( nextUrlPart ) )
1204+ {
1205+ nextUrl = urlBase + nextUrlPart ;
1206+ }
1207+ else
1208+ {
1209+ nextUrl = null ;
1210+ }
12021211 }
12031212 else
12041213 {
You can’t perform that action at this time.
0 commit comments