A local-first personal finance app
Fix undefined points error in contributor points (#5392)
Matiss Janis Aboltins1861060bdae1
diff --git a/.github/scripts/count-points.mjs b/.github/scripts/count-points.mjsindex 1796ddef95..b584ff738f 100644--- a/.github/scripts/count-points.mjs+++ b/.github/scripts/count-points.mjs@@ -236,16 +236,20 @@ async function countContributorPoints(repo) {) {const remover = event.actor.login;const userStats = stats.get(remover);- userStats.labelRemovals.push(issue.number.toString());- userStats.points += config.POINTS_PER_ISSUE_TRIAGE_ACTION;+ if (userStats) {+ userStats.labelRemovals.push(issue.number.toString());+ userStats.points += config.POINTS_PER_ISSUE_TRIAGE_ACTION;+ }}// Check if the issue was closed with "no planned" statusif (event.event === 'closed' && event.state_reason === 'not_planned') {const closer = event.actor.login;const userStats = stats.get(closer);- userStats.issueClosings.push(issue.number.toString());- userStats.points += config.POINTS_PER_ISSUE_CLOSING_ACTION;+ if (userStats) {+ userStats.issueClosings.push(issue.number.toString());+ userStats.points += config.POINTS_PER_ISSUE_CLOSING_ACTION;+ }}});}diff --git a/upcoming-release-notes/5392.md b/upcoming-release-notes/5392.mdnew file mode 100644index 0000000000..875470c333--- /dev/null+++ b/upcoming-release-notes/5392.md@@ -0,0 +1,6 @@+---+category: Maintenance+authors: [MatissJanis]+---++Fix contributor point calculation in July