-
Notifications
You must be signed in to change notification settings - Fork 896
feat: generate golden files for notification templates #14537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very excited for this! Thanks a mil.
Left a couple comments; there are some extraneous changes which don't belong in this PR which I think we should remove.
require.NoError(t, err, "failed to render notification body template") | ||
require.NotEmpty(t, body, "body should not be empty") | ||
|
||
partialName := strings.Join(strings.Split(t.Name(), "/")[1:], "_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels odd to have this in a test which is not explicitly for this purpose.
Can we split this out, rather?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let's rely depend on strings.Split
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry you interpreted what I said literally 😆
I meant splitting out the functionality into another test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post-merge approval 👍 thanks Marcin!!
Related: coder/internal#40
Changes:
export DB=ci
, the simplest way is run./scripts/develop.sh
in background)MessagePayload
withData map[string]any
Note: I believe our notification templates need some love in favor of spelling/formatting consistency. I will follow-up on this.