Skip to content

Commit

Permalink
Merge branch 'master' into ghapiv4-2-run-concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
lourot committed Jan 15, 2019
2 parents 48a9d88 + 4c7ffe7 commit d12f1e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fetchRepos.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ optional arguments:
let ghAPIV4Cursor;
const perPage = 100;
for (let page = 1;; ++page) {
const ghDataJson = await ghcl.pullRequests([404, 500], repo.full_name, page, perPage, ghAPIV4Cursor);
const ghDataJson = await ghcl.pullRequests([404, 500, 502], repo.full_name, page, perPage,
ghAPIV4Cursor);
ghAPIV4Cursor = ghDataJson[0] ? ghDataJson[0].cursor : undefined;

switch (ghDataJson) {
Expand All @@ -364,6 +365,10 @@ optional arguments:
// next run. For now just don't crash.
console.log(`${tag} was just removed from GitHub`);
return;
case 502:
// About twice per month we hit 502 'Server Error', often on repo
// everypolitician/everypolitician-data, so let's not crash and move on, even if this
// means that we'll miss some pull requests sometimes.
case 500: // Workaround for #8
console.log(`${tag} failed`);
return;
Expand Down

0 comments on commit d12f1e1

Please sign in to comment.