Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaff9e6c

Browse files
committed
Review comments
Signed-off-by: Danny Kopping <danny@coder.com>
1 parentc6e75c2 commitaff9e6c

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

‎coderd/database/migrations/000221_notifications.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ CREATE INDEX idx_notification_messages_status ON notification_messages (status);
5252
-- TODO: autogenerate constants which reference the UUIDs
5353
INSERT INTO notification_templates (id, name, title_template, body_template,"group", actions)
5454
VALUES ('f517da0b-cdc9-410f-ab89-a86107c420ed','Workspace Deleted', E'Workspace "{{.Labels.name}}" deleted',
55-
E'Hi {{.UserName}}\n\nYour workspace **{{.Labels.name}}** was deleted.\nThe specified reason was "**{{.Labels.reason}}{{ if .Labels.initiatedBy }} ({{ .Labels.initiatedBy }}){{end}}**".',
55+
E'Hi {{.UserName}}\n\nYour workspace **{{.Labels.name}}** was deleted.\nThe specified reason was "**{{.Labels.reason}}{{ if .Labels.initiator }} ({{ .Labels.initiator }}){{end}}**".',
5656
'Workspace Events','[
5757
{
5858
"label": "View workspaces",

‎coderd/notifications/dispatch/webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ func (w *WebhookHandler) dispatch(msgPayload types.MessagePayload, title, body,
8888

8989
// Handle response.
9090
ifresp.StatusCode/100>2 {
91-
// Body could be quite long here, let's grab the first500B and hope it contains useful debug info.
92-
respBody:=make([]byte,500)
91+
// Body could be quite long here, let's grab the first512B and hope it contains useful debug info.
92+
respBody:=make([]byte,512)
9393
lr:=io.LimitReader(resp.Body,int64(len(respBody)))
9494
n,err:=lr.Read(respBody)
9595
iferr!=nil&&!errors.Is(err,io.EOF) {

‎coderd/notifications/events.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ package notifications
22

33
import"github.com/google/uuid"
44

5-
// Workspaces.
6-
varTemplateWorkspaceDeleted=uuid.MustParse("f517da0b-cdc9-410f-ab89-a86107c420ed")// ...
5+
// These vars are mapped to UUIDs in the notification_templates table.
6+
// TODO: autogenerate these.
7+
8+
// Workspace-related events.
9+
varTemplateWorkspaceDeleted=uuid.MustParse("f517da0b-cdc9-410f-ab89-a86107c420ed")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp