Skip to content

Commit 1118d67

Browse files
committed
WIP
1 parent e200056 commit 1118d67

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

coderd/database/migrations/000249_email_reports.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Template {{.Labels.template_display_name}} has failed to build {{.Data.failed_bu
1010
**{{$version.template_version_name}}** failed {{$version.failed_count}} time{{if gt $version.failed_count 1}}s{{end}}:
1111
{{range $build := $version.failed_builds}}
1212
* [{{$build.workspace_owner_username}} / {{$build.workspace_name}} / #{{$build.build_number}}]({{base_url}}/@{{$build.workspace_owner_username}}/{{$build.workspace_name}}/builds/{{$build.build_number}})
13-
{{end}}
13+
{{- end}}
1414
{{end}}
1515
1616
We recommend reviewing these issues to ensure future builds are successful.',

coderd/notifications/notifications_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import (
5151
)
5252

5353
// updateGoldenFiles is a flag that can be set to update golden files.
54-
var updateGoldenFiles = flag.Bool("update", true, "Update golden files")
54+
var updateGoldenFiles = flag.Bool("update", false, "Update golden files")
5555

5656
func TestMain(m *testing.M) {
5757
goleak.VerifyTestMain(m)
@@ -861,7 +861,7 @@ func TestNotificationTemplatesCanRender(t *testing.T) {
861861
{
862862
"template_version_name": "bobby-template-version-1",
863863
"failed_count": 3,
864-
"builds": []map[string]any{
864+
"failed_builds": []map[string]any{
865865
{
866866
"workspace_owner_username": "mtojek",
867867
"workspace_name": "workspace-1",
@@ -882,7 +882,7 @@ func TestNotificationTemplatesCanRender(t *testing.T) {
882882
{
883883
"template_version_name": "bobby-template-version-2",
884884
"failed_count": 1,
885-
"builds": []map[string]any{
885+
"failed_builds": []map[string]any{
886886
{
887887
"workspace_owner_username": "ben",
888888
"workspace_name": "cool-workspace",

coderd/notifications/testdata/rendered-templates/TemplateWorkspaceBuildSummary-body.md.golden

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,13 @@ Template Bobby First Template has failed to build 4/55 times over the last week
77

88
**bobby-template-version-1** failed 3 times:
99

10+
* [mtojek / workspace-1 / #1234](http://test.com/@mtojek/workspace-1/builds/1234)
11+
* [johndoe / my-workspace-3 / #5678](http://test.com/@johndoe/my-workspace-3/builds/5678)
12+
* [jack / workwork / #774](http://test.com/@jack/workwork/builds/774)
1013

1114
**bobby-template-version-2** failed 1 time:
1215

16+
* [ben / cool-workspace / #8888](http://test.com/@ben/cool-workspace/builds/8888)
1317

1418

1519
We recommend reviewing these issues to ensure future builds are successful.

0 commit comments

Comments
 (0)