Skip to content

Move email templates to data#5496

Merged
evankanderson merged 1 commit intomindersec:mainfrom
evankanderson:add-sendgrid
Mar 12, 2025
Merged

Move email templates to data#5496
evankanderson merged 1 commit intomindersec:mainfrom
evankanderson:add-sendgrid

Conversation

@evankanderson
Copy link
Member

Summary

The current email template contents are both hard-coded and Stacklok-specific. Move these to kodata, so that other users can customize their own email templates.

I also noticed that we were using NewSafeHTMLTemplate for the text body, and re-parsing the templates every time -- this is now moved to module-level initialization (this means you need to restart the server to pick up new templates, but this seems reasonable given that other config requires a restart

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Unit tests (so far) -- will do some integration testing after merge.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@evankanderson evankanderson requested a review from a team as a code owner March 12, 2025 00:34
@evankanderson evankanderson merged commit d1ba5af into mindersec:main Mar 12, 2025
26 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.

2 participants