feat: add brand_color default to load_email_template (#344) #352
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/basketball-api!352
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "344-brand-color-templates"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a default
brand_colorof#d42026(Kings red) toload_email_template()so templates using{{brand_color}}placeholders render correctly without callers needing to explicitly pass it. Queens callers passbrand_color='#e91e8c'to override.Changes
src/basketball_api/services/email.py— After loading HTML and before the replacement loop, defaultdata['brand_color']to#d42026if not already providedTest Plan
pytest tests/— 0 failures)brand_color='#e91e8c'in data dictReview Checklist
Related
{{brand_color}}placeholders applied to action.html (10 replacements), announcement.html (13), notification.html (9) on host filesystemRelated Notes
Default brand_color to Kings red (#d42026) if not provided in data dict, enabling templates to use {{brand_color}} placeholders while maintaining backwards compatibility for all existing callers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>QA Review — PR #352
Diff Summary
src/basketball_api/services/email.py(+4 lines)brand_color = '#d42026'inload_email_template()if not provided indatadictFindings
not incheck ensures existing callers are unaffected while new template placeholders resolve.brand_color, so they all get Kings red by default.datadict. This is acceptable given current usage patterns (callers constructdatainline), but worth noting.Nits
VERDICT: APPROVED