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

Commit62b6b8d

Browse files
committed
add deployment config for push notifications
1 parent3be84b4 commit62b6b8d

File tree

10 files changed

+93
-1
lines changed

10 files changed

+93
-1
lines changed

‎cli/server.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
777777
}
778778

779779
// Manage push notifications.
780-
{
780+
ifoptions.DeploymentValues.Notifications.Push.Enabled{
781781
pushNotifier,err:=push.New(ctx,&options.Logger,options.Database)
782782
iferr!=nil {
783783
options.Logger.Error(ctx,"failed to create push notifier",slog.Error(err))
@@ -787,6 +787,10 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
787787
}
788788
}
789789
options.PushNotifier=pushNotifier
790+
}else {
791+
options.PushNotifier=&push.NoopNotifier{
792+
Msg:"Push notifications are not configured.",
793+
}
790794
}
791795

792796
githubOAuth2ConfigParams,err:=getGithubOAuth2ConfigParams(ctx,options.Database,vals)

‎cli/testdata/coder_server_--help.golden‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,10 @@ NOTIFICATIONS / INBOX OPTIONS:
479479
--notifications-inbox-enabled bool, $CODER_NOTIFICATIONS_INBOX_ENABLED (default: true)
480480
Enable Coder Inbox.
481481

482+
NOTIFICATIONS / PUSH OPTIONS:
483+
--notifications-push-enabled bool, $CODER_NOTIFICATIONS_PUSH_ENABLED (default: false)
484+
Enable push notifications using VAPID.
485+
482486
NOTIFICATIONS / WEBHOOK OPTIONS:
483487
--notifications-webhook-endpoint url, $CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT
484488
The endpoint to which to send webhooks.

‎cli/testdata/server-config.yaml.golden‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,3 +681,7 @@ notifications:
681681
# How often to query the database for queued notifications.
682682
# (default: 15s, type: duration)
683683
fetchInterval: 15s
684+
push:
685+
# Enable push notifications using VAPID.
686+
# (default: false, type: bool)
687+
enabled: false

‎coderd/apidoc/docs.go‎

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json‎

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/reference/api/general.md‎

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/reference/api/schemas.md‎

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/reference/cli/server.md‎

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎enterprise/cli/testdata/coder_server_--help.golden‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,10 @@ NOTIFICATIONS / INBOX OPTIONS:
480480
--notifications-inbox-enabled bool, $CODER_NOTIFICATIONS_INBOX_ENABLED (default: true)
481481
Enable Coder Inbox.
482482

483+
NOTIFICATIONS / PUSH OPTIONS:
484+
--notifications-push-enabled bool, $CODER_NOTIFICATIONS_PUSH_ENABLED (default: false)
485+
Enable push notifications using VAPID.
486+
483487
NOTIFICATIONS / WEBHOOK OPTIONS:
484488
--notifications-webhook-endpoint url, $CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT
485489
The endpoint to which to send webhooks.

‎site/src/api/typesGenerated.ts‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp