Files
coder/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceBuildsFailedReport.json.golden
T
Sas Swart 208ed1efd7 chore(coderd/notifications): expand golden file testing for notifications (#15032)
This PR aims to close https://github.com/coder/coder/issues/14913.

It expands the golden files for the notifier to include the entire
payload serialised as JSON.
2024-10-14 12:34:32 +00:00

66 lines
3.1 KiB
Plaintext

{
"_version": "1.1",
"msg_id": "00000000-0000-0000-0000-000000000000",
"payload": {
"_version": "1.1",
"notification_name": "Report: Workspace Builds Failed For Template",
"notification_template_id": "00000000-0000-0000-0000-000000000000",
"user_id": "00000000-0000-0000-0000-000000000000",
"user_email": "bobby@coder.com",
"user_name": "Bobby",
"user_username": "bobby",
"actions": [
{
"label": "View workspaces",
"url": "http://test.com/workspaces?filter=template%3Abobby-first-template"
}
],
"labels": {
"template_display_name": "Bobby First Template",
"template_name": "bobby-first-template"
},
"data": {
"failed_builds": 4,
"report_frequency": "week",
"template_versions": [
{
"failed_builds": [
{
"build_number": 1234,
"workspace_name": "workspace-1",
"workspace_owner_username": "mtojek"
},
{
"build_number": 5678,
"workspace_name": "my-workspace-3",
"workspace_owner_username": "johndoe"
},
{
"build_number": 774,
"workspace_name": "workwork",
"workspace_owner_username": "jack"
}
],
"failed_count": 3,
"template_version_name": "bobby-template-version-1"
},
{
"failed_builds": [
{
"build_number": 8888,
"workspace_name": "cool-workspace",
"workspace_owner_username": "ben"
}
],
"failed_count": 1,
"template_version_name": "bobby-template-version-2"
}
],
"total_builds": 55
}
},
"title": "Workspace builds failed for template \"Bobby First Template\"",
"title_markdown": "Workspace builds failed for template \"Bobby First Template\"",
"body": "Hi Bobby,\n\nTemplate Bobby First Template has failed to build 4/55 times over the last week.\n\nReport:\n\nbobby-template-version-1 failed 3 times:\n\nmtojek / workspace-1 / #1234 (http://test.com/@mtojek/workspace-1/builds/1234)\njohndoe / my-workspace-3 / #5678 (http://test.com/@johndoe/my-workspace-3/builds/5678)\njack / workwork / #774 (http://test.com/@jack/workwork/builds/774)\n\nbobby-template-version-2 failed 1 time:\n\nben / cool-workspace / #8888 (http://test.com/@ben/cool-workspace/builds/8888)\n\nWe recommend reviewing these issues to ensure future builds are successful.",
"body_markdown": "Hi Bobby,\n\nTemplate **Bobby First Template** has failed to build 4/55 times over the last week.\n\n**Report:**\n\n**bobby-template-version-1** failed 3 times:\n\n* [mtojek / workspace-1 / #1234](http://test.com/@mtojek/workspace-1/builds/1234)\n* [johndoe / my-workspace-3 / #5678](http://test.com/@johndoe/my-workspace-3/builds/5678)\n* [jack / workwork / #774](http://test.com/@jack/workwork/builds/774)\n\n**bobby-template-version-2** failed 1 time:\n\n* [ben / cool-workspace / #8888](http://test.com/@ben/cool-workspace/builds/8888)\n\nWe recommend reviewing these issues to ensure future builds are successful."
}