A local-first personal finance app
Fix potential undefined points issue in contributor points calculation (#5393)
Matiss Janis Aboltins45530638feaa
diff --git a/.github/scripts/count-points.mjs b/.github/scripts/count-points.mjsindex b584ff738f..ebdb2d949c 100644--- a/.github/scripts/count-points.mjs+++ b/.github/scripts/count-points.mjs@@ -161,9 +161,9 @@ async function countContributorPoints(repo) {const isReleasePR = pr.title.match(/^🔖 \(\d+\.\d+\.\d+\)/);// Calculate points for reviewers based on PR size- const prPoints = config.PR_REVIEW_POINT_TIERS.find(- tier => totalChanges > tier.minChanges,- ).points;+ const prPoints =+ config.PR_REVIEW_POINT_TIERS.find(tier => totalChanges > tier.minChanges)+ ?.points ?? 0;// Award points to the PR creator if it's a release PRif (isReleasePR && stats.has(pr.user.login)) {diff --git a/upcoming-release-notes/5393.md b/upcoming-release-notes/5393.mdnew file mode 100644index 0000000000..045fd0d3f6--- /dev/null+++ b/upcoming-release-notes/5393.md@@ -0,0 +1,7 @@+---+category: Maintenance+authors: [MatissJanis]+---++Fix contributor points calculation to prevent runtime errors from undefined tier objects.+