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

Commit1267c9c

Browse files
fix: ensure reason present for workspace autoupdated notification (#17935)
Fixes#17930Update the `WorkspaceAutoUpdated` notification to only display thereason if it is present.
1 parent769c9ee commit1267c9c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎coderd/autobuild/lifecycle_executor.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,18 @@ func (e *Executor) runOnce(t time.Time) Stats {
349349
nextBuildReason=string(nextBuild.Reason)
350350
}
351351

352+
templateVersionMessage:=activeTemplateVersion.Message
353+
iftemplateVersionMessage=="" {
354+
templateVersionMessage="None provided"
355+
}
356+
352357
if_,err:=e.notificationsEnqueuer.Enqueue(e.ctx,ws.OwnerID,notifications.TemplateWorkspaceAutoUpdated,
353358
map[string]string{
354359
"name":ws.Name,
355360
"initiator":"autobuild",
356361
"reason":nextBuildReason,
357362
"template_version_name":activeTemplateVersion.Name,
358-
"template_version_message":activeTemplateVersion.Message,
363+
"template_version_message":templateVersionMessage,
359364
},"autobuild",
360365
// Associate this notification with all the related entities.
361366
ws.ID,ws.OwnerID,ws.TemplateID,ws.OrganizationID,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp