feat(email): HTML branded templates with inline logo, wire remaining notification types
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
- All webhook emails now render as branded HTML (dark header, inline base64 Aegis logo, card layout, CTA-button links) instead of plain text. - Wired the 7 remaining notification-preference keys that had no trigger: stale coverage alerts, campaign-activated assignment emails, generic test-state-change steps (execution started / blue evaluating / in review), all-team-validation broadcasts on every lead vote, webhook delivery failures (3rd consecutive failure), new user registration, and background job errors (APScheduler global error listener). - New notify_roles_by_email() helper for role-scoped, preference-gated, actor-excludable broadcasts. - Fixed apscheduler.events stubbing gaps in several test files' sys.modules fakes that broke full-suite collection after adding the APScheduler error-listener import.
This commit is contained in:
@@ -39,6 +39,7 @@ from app.services.notification_service import (
|
||||
notify_test_state_change,
|
||||
create_notification,
|
||||
notify_role_with_email,
|
||||
notify_roles_by_email,
|
||||
)
|
||||
|
||||
# Assign logger = logging.getLogger(__name__)
|
||||
@@ -1048,6 +1049,13 @@ def validate_as_red_lead(
|
||||
},
|
||||
)
|
||||
|
||||
notify_roles_by_email(
|
||||
db, roles=["red_lead", "blue_lead"],
|
||||
preference_key="email_on_all_team_validations",
|
||||
subject=f"Red Lead Vote: {test.name}",
|
||||
message=f'{user.full_name or user.username} cast a "{validation_status}" vote as Red Lead on test "{test.name}".',
|
||||
exclude_user_id=user.id,
|
||||
)
|
||||
_dispatch_dual_validation_effects(db, test, entity, actor=user)
|
||||
return test
|
||||
|
||||
@@ -1113,6 +1121,13 @@ def validate_as_blue_lead(
|
||||
},
|
||||
)
|
||||
|
||||
notify_roles_by_email(
|
||||
db, roles=["red_lead", "blue_lead"],
|
||||
preference_key="email_on_all_team_validations",
|
||||
subject=f"Blue Lead Vote: {test.name}",
|
||||
message=f'{user.full_name or user.username} cast a "{validation_status}" vote as Blue Lead on test "{test.name}".',
|
||||
exclude_user_id=user.id,
|
||||
)
|
||||
_dispatch_dual_validation_effects(db, test, entity, actor=user)
|
||||
return test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user