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
1158
1158
{
1159
1159
HttpResponseMessage response ;
1160
1160
string nextUrl = initialMessage . RequestUri . ToString ( ) ;
1161
+ string urlBase = initialMessage . RequestUri . Scheme + "://" + initialMessage . RequestUri . Host ;
1161
1162
JObject finalResult = new JObject ( ) ;
1162
1163
JArray allRepositories = new JArray ( ) ;
1163
1164
@@ -1198,7 +1199,15 @@ private async Task<JObject> SendRequestAsyncWithPagination(HttpRequestMessage in
1198
1199
{
1199
1200
var linkHeader = string . Join ( "," , linkHeaders ) ;
1200
1201
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
+ }
1202
1211
}
1203
1212
else
1204
1213
{
You can’t perform that action at this time.
0 commit comments