Skip to content

Commit

Permalink
Score triaged defects: Add a try-catch around setNewScore()
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
manuroe committed Apr 26, 2024
1 parent 95a4fc2 commit b65037c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/score-triaged-defects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}
});

Expand Down

0 comments on commit b65037c

Please sign in to comment.