Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support custom notifications #19611

@ssncferreira

Description

@ssncferreira

Description

Currently, notifications in Coder are limited to predefined templates with hard-coded text and placeholders. To support use cases such as admins or workspace users sending arbitrary notifications, we need to add backend support for custom notifications.

Initially, users will only be able to send notifications to themselves, but the design should allow extending this in the future to groups or selected users.

Implementation Steps

  1. Notification template
  • Create a new generic template that has a single placeholder for user messages.
  • Ensure it integrates with the existing notification implementation.
  1. API endpoint
  • Add a new authenticated endpoint that allows a user to send a custom notification.
  1. CLI command
  • Add a CLI subcommand (e.g., coder notify ) that calls the new API endpoint.
  • Example usage to send a notification to the user if make test succeeds: make test && coder notify "tests passed"

Scope

  • For now, only the requesting user can be the recipient.
  • Update documentation with an example on how to send custom notifications.
  • Future: make it extensible to allow group or multi-user delivery.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions