From b65037c933fbad128ce5deaa3306d119d87cf9d1 Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 26 Apr 2024 14:46:14 +0200 Subject: [PATCH] Score triaged defects: Add a try-catch around setNewScore() To avoid the entire GH action to fail on a single issue. The GHA was long failing because on EW because of an archived issue (https://github.com/element-hq/element-meta/actions/runs/8847972146/job/24296892847). --- .github/actions/score-triaged-defects.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/score-triaged-defects.js b/.github/actions/score-triaged-defects.js index 6782885..582130e 100644 --- a/.github/actions/score-triaged-defects.js +++ b/.github/actions/score-triaged-defects.js @@ -209,7 +209,9 @@ async function setNewScore(scoreItem, projectFieldId, fieldValue) { if (scoreItem.score == null || scoreItem.score.number != computedScore) { console.log(issue.number + " - " + " Updating score from " + (scoreItem.score ? scoreItem.score.number : "null") + " to " + computedScore + " - " + issue.title); - setNewScore(scoreItem, projectFieldId, computedScore); + setNewScore(scoreItem, projectFieldId, computedScore).catch(error => { + console.error(" Error updating score: " + error); + }); } });