Skip to content

Fix skill-match project alerts (fire on project going live) - #187

Merged
hturnbull93 merged 2 commits into
mainfrom
fix/match-digest-daily
Jul 26, 2026
Merged

Fix skill-match project alerts (fire on project going live)#187
hturnbull93 merged 2 commits into
mainfrom
fix/match-digest-daily

Conversation

@hturnbull93

@hturnbull93 hturnbull93 commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Volunteers can opt into email_digest: 'match' ("email me when a project matches my skills"), but no job ever read that value — the alert never fired.
  • Adds lib/project-match.ts:notifyMatchingVolunteers(), called the moment a project goes live: on org-project create, and on review when an admin sets status: 'approved'.
  • Uses the same calculateMatchScore / matchGradeLabel from lib/matching.ts that powers the project-list match badges, and only emails a volunteer when the project is at least a Good match for them (i.e. ≥2 required skills matched) — partial matches don't trigger an email.

Test plan

  • npm run typecheck
  • npm run lint
  • npm run format:check
  • npm test — CI will run the e2e suite

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y7LqHwh4oR1wbyKgRbhTiF

Volunteers could opt into "email me when a project matches my skills"
(email_digest='match'), but no job ever read that value, so the alert
never fired. Wire it to fire per-project the moment it goes live
(org-project create, or admin approval of a proposed project) instead
of batching on a cron.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7LqHwh4oR1wbyKgRbhTiF
@railway-app
railway-app Bot temporarily deployed to PauseAI Catalyse / catalyse-pr-187 July 25, 2026 15:06 Destroyed
Use the shared calculateMatchScore/matchGradeLabel from lib/matching.ts
(already used for project-list match badges) instead of a raw percent,
and gate the email on grade >= Good match so partial matches don't spam
volunteers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7LqHwh4oR1wbyKgRbhTiF
@railway-app
railway-app Bot temporarily deployed to PauseAI Catalyse / catalyse-pr-187 July 25, 2026 15:20 Destroyed
@railway-app

railway-app Bot commented Jul 25, 2026

Copy link
Copy Markdown

🚅 Deployed to the catalyse-pr-187 environment in PauseAI Catalyse

Service Status Web Updated (UTC)
web ✅ Success (View Logs) Web Jul 25, 2026 at 3:22 pm
1 service not affected by this PR
  • Cron for digest

@hturnbull93
hturnbull93 merged commit 5e14f3c into main Jul 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant