Code monitors: update email code to fit existing patterns
Created by: camdencheek
This updates the code that generates emails to be more in line with our other action types in preparation for updating the email templates and adding result contents to the emails.
Overview:
- Uses
actionArgs
for emails. This struct is the intersection of information we need to render any action, and it is already used for webhooks and slack webhooks. This just updates emails to use it as well. - Moves email files into their own file and embeds them. This is nice because it makes it easier to edit them and gives me syntax highlighting in my editor.
- Merges a couple of email files that don't need to be separate anymore
- Adds a bunch of goldenfile tests. This allows us to see what the emails currently are rendered as, and will make it more clear how they change in followup PRs.
Test plan
Added a bunch of tests locking in email formatting so it's clear what changes in followup PRs.