From f39b37912680f04ff2c2c50b7383aee6ac5e0443 Mon Sep 17 00:00:00 2001 From: law909 <balint.lovey@gmail.com> Date: Thu, 20 Jun 2024 10:47:11 +0200 Subject: [PATCH] Disable process exit on unexpected Github HTML --- packages/automation/consolidate_data.js | 4 ++-- packages/automation/generate_nominees.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/automation/consolidate_data.js b/packages/automation/consolidate_data.js index 673faa0..a327f25 100644 --- a/packages/automation/consolidate_data.js +++ b/packages/automation/consolidate_data.js @@ -25,7 +25,7 @@ async function start() { // Fetch all migrated DPGs from new app api at https://app.digitalpublicgoods.net/api/dpgs let dpgjson = await fetch("https://api.digitalpublicgoods.net/dpgs"); dpgjson = await dpgjson.json(); - + const dpgs = [...dpgjson]; console.log("DPG's in registry API - ",dpgs.length) let allData = []; @@ -213,7 +213,7 @@ async function fetchGithubActivity(org, item) { console.log( "Found something else where the activity chart is expected. This most likely indicates that GitHub has changed the HTML, and this code needs adjustment." ); - process.exit(1); + //process.exit(1); } } else { console.log("Activity chart NOT found ! ! ! ! !"); diff --git a/packages/automation/generate_nominees.js b/packages/automation/generate_nominees.js index 7bf8773..4f1e0d7 100644 --- a/packages/automation/generate_nominees.js +++ b/packages/automation/generate_nominees.js @@ -128,7 +128,7 @@ async function fetchGithubActivity(org, item){ output = '<a href="https://github.com/'+org+'/'+item+'" target="_blank">' + list.html() + '</a>'; } else { console.log('Found something else where the activity chart is expected. This most likely indicates that GitHub has changed the HTML, and this code needs adjustment.'); - process.exit(1); + //process.exit(1); } } else { console.log('Activity chart NOT found ! ! ! ! !') @@ -155,7 +155,7 @@ glob(path.join(npath, '/*.json'), {}, async (err, files) => { if(matchGithub){ html += await fetchGithubActivity(matchGithub[1], matchGithub[2]); } - } + } } n['githubActivity'] = html; if(n['stage'] === 'DPG' && fs.existsSync(path.join(spath, path.basename(files[i])))) {