Skip to content

feat(coderd): add company logo when available for email notifications #14935

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

Merged
merged 27 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a42f108
feat(notifications): add company logo url when available for email no…
defelmnq Oct 2, 2024
1fa1271
feat(notifications): adapt tests with new labels
defelmnq Oct 3, 2024
2def52e
fix: revert changes on generated code version
defelmnq Oct 3, 2024
1b1a4c4
feat(notification): move logo_url and app_name logic to helpers funct…
defelmnq Oct 3, 2024
779260e
chore: remove unused GetLogoURL method from notifications store inter…
defelmnq Oct 3, 2024
1e6899f
fix: add better context and timeout for db related queries
defelmnq Oct 4, 2024
b552267
chore: lint
defelmnq Oct 4, 2024
73e07e9
feat(notifications): improve logo_url and app_name fetching moving it…
defelmnq Oct 16, 2024
70e23ae
feat(notifications): improve logo_url and app_name fetching moving it…
defelmnq Oct 16, 2024
2f620c9
feat(notifications): improve logo_url and app_name fetching moving it…
defelmnq Oct 16, 2024
fdcdf7b
feat(notifications): improve logo_url and app_name fetching moving it…
defelmnq Oct 16, 2024
9c6c105
feat(coderd): regenerate golden files
Oct 16, 2024
0c131a5
feat(notifications): working on tests for logo and app_name
defelmnq Oct 17, 2024
34d6611
feat(notifications): change helpers logic to be defined in the Dispat…
Oct 17, 2024
0a9a66a
feat(notifications): add golden file for custom appearance
Oct 17, 2024
bf558cb
feat(notifications): add golden file for custom appearance
Oct 17, 2024
a420f37
feat(notifications): work on tests
defelmnq Oct 18, 2024
51d8d33
feat(notifications): add golden file for custom appearance
defelmnq Oct 18, 2024
d492d09
feat(notifications): add golden file for custom appearance
defelmnq Oct 18, 2024
0c9c485
feat(notifications): add comment ent in tests for enterprise feature
defelmnq Oct 18, 2024
a6d4a0c
feat(coderd): remove unused call
defelmnq Oct 18, 2024
4c5cb3d
fix(notifications): improve tests and some nit fixes
defelmnq Oct 18, 2024
e419431
chore(retry): improve retry policy on fetcher
defelmnq Oct 18, 2024
a7fec66
Merge remote-tracking branch 'origin/main' into feat/notif-custom-logo
defelmnq Oct 21, 2024
8b766f6
improve errors handling
defelmnq Oct 22, 2024
157e086
improve errors handling
defelmnq Oct 22, 2024
790ff33
improve errors handling
defelmnq Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/main' into feat/notif-custom-logo
  • Loading branch information
defelmnq committed Oct 21, 2024
commit a7fec66eddc1f227a04c8e9c346e609586f595c7
2 changes: 1 addition & 1 deletion coderd/notifications/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ func TestCustomMethodMetricCollection(t *testing.T) {
)

// GIVEN: a template whose notification method differs from the default.
out, err := api.Database.UpdateNotificationTemplateMethodByID(ctx, database.UpdateNotificationTemplateMethodByIDParams{
out, err := store.UpdateNotificationTemplateMethodByID(ctx, database.UpdateNotificationTemplateMethodByIDParams{
ID: tmpl,
Method: database.NullNotificationMethod{NotificationMethod: customMethod, Valid: true},
})
Expand Down
8 changes: 4 additions & 4 deletions coderd/notifications/notifications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ func TestSMTPDispatch(t *testing.T) {
Smarthost: serpent.HostPort{Host: "localhost", Port: fmt.Sprintf("%d", mockSMTPSrv.PortNumber())},
Hello: "localhost",
}
handler := newDispatchInterceptor(dispatch.NewSMTPHandler(cfg.SMTP, api.Logger.Named("smtp")))
mgr, err := notifications.NewManager(cfg, api.Database, defaultHelpers(), createMetrics(), api.Logger.Named("manager"))
handler := newDispatchInterceptor(dispatch.NewSMTPHandler(cfg.SMTP, defaultHelpers(), logger.Named("smtp")))
mgr, err := notifications.NewManager(cfg, store, defaultHelpers(), createMetrics(), logger.Named("manager"))
require.NoError(t, err)
mgr.WithHandlers(map[database.NotificationMethod]notifications.Handler{method: handler})
t.Cleanup(func() {
Expand Down Expand Up @@ -1497,7 +1497,7 @@ func TestCustomNotificationMethod(t *testing.T) {
defaultMethod = database.NotificationMethodSmtp
customMethod = database.NotificationMethodWebhook
)
out, err := api.Database.UpdateNotificationTemplateMethodByID(ctx, database.UpdateNotificationTemplateMethodByIDParams{
out, err := store.UpdateNotificationTemplateMethodByID(ctx, database.UpdateNotificationTemplateMethodByIDParams{
ID: tmpl,
Method: database.NullNotificationMethod{NotificationMethod: customMethod, Valid: true},
})
Expand Down Expand Up @@ -1525,7 +1525,7 @@ func TestCustomNotificationMethod(t *testing.T) {
require.NoError(t, err)

// WHEN: a notification of that template is enqueued, it should be delivered with the configured method - not the default.
user := createSampleUser(t, api.Database)
user := createSampleUser(t, store)
msgID, err := enq.Enqueue(ctx, user.ID, tmpl, map[string]string{}, "test")
require.NoError(t, err)

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.