Skip to content

A local-first personal finance app

improvements to release PR points counting logic (#5450)

Matt Fiddaman8d84f16604ad
diff --git a/.github/scripts/count-points.mjs b/.github/scripts/count-points.mjs
index 09cb6b0872..6e8954f320 100644
--- a/.github/scripts/count-points.mjs
+++ b/.github/scripts/count-points.mjs
@@ -166,22 +166,24 @@ async function countContributorPoints(repo) {
.reduce((sum, file) => sum + file.additions + file.deletions, 0);
// Check if this is a release PR
- const isReleasePR = pr.title.match(/^πŸ”– \(\d+\.\d+\.\d+\)/);
+ 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 ?? 0;
- // Award points to the PR creator if it's a release PR
- if (isReleasePR && stats.has(pr.user.login)) {
- const creatorStats = stats.get(pr.user.login);
- creatorStats.reviews.push({
- pr: pr.number.toString(),
- points: config.POINTS_PER_RELEASE_PR,
- isReleaseCreator: true,
- });
- creatorStats.points += config.POINTS_PER_RELEASE_PR;
+ if (isReleasePR) {
+ // Award points to the PR creator if it's a release PR
+ if (stats.has(pr.user.login)) {
+ const creatorStats = stats.get(pr.user.login);
+ creatorStats.reviews.push({
+ pr: pr.number.toString(),
+ points: config.POINTS_PER_RELEASE_PR,
+ isReleaseCreator: true,
+ });
+ creatorStats.points += config.POINTS_PER_RELEASE_PR;
+ }
} else {
// Add points to the reviewers
const uniqueReviewers = new Set();