Skip to content

Commit

Permalink
Fix issue with link paging link not being provided by GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed May 20, 2021
1 parent 698fbc4 commit c40c068
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions action.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@ const { callbackify } = require('util');

if (processLinks) {
// Process all paging links, but only on first request.
console.log(res.headers.link);
var links = res.headers.link.split(', ');

for (i = 0; i < links.length; i++) {
let link = links[i];
link = link.substring(1, link.indexOf('>'));
console.log('link:' + link);
urls.push(link);
if (res.headers.link) {
var links = res.headers.link.split(', ');

for (i = 0; i < links.length; i++) {
let link = links[i];
link = link.substring(1, link.indexOf('>'));
console.log('link:' + link);
urls.push(link);
}
}
}

Expand Down

0 comments on commit c40c068

Please sign in to comment.