-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
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
- Notification template
- Create a new generic template that has a single placeholder for user messages.
- Ensure it integrates with the existing notification implementation.
- API endpoint
- Add a new authenticated endpoint that allows a user to send a custom notification.
- 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