Refactor thand notifier and provided email templating #81
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the notification system to support multiple recipients and adds authorization notifications. The changes introduce parallel notification processing, separate implementations for approval and authorization notifications, and enhance the email provider configuration.
Key Changes:
- Refactored notification system to support multiple recipients with parallel execution (both Temporal and Go routines)
- Added authorization notification support that sends confirmation emails/messages when access requests are approved
- Enhanced email provider to support multiple recipients and improved SMTP configuration
- Split provider interface definitions into separate files for better organization
Reviewed Changes
Copilot reviewed 47 out of 48 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
internal/workflows/tasks/providers/thand/notify.go |
Refactored to support multiple recipients with parallel execution |
internal/workflows/tasks/providers/thand/notify_impl.go |
New notifier interface implementation for basic notifications |
internal/workflows/tasks/providers/thand/authorize_notifier.go |
New notifier for sending approval confirmation notifications to users |
internal/workflows/tasks/providers/thand/approvals_notifier.go |
New notifier for sending approval request notifications |
internal/workflows/tasks/providers/thand/authorize.go |
Enhanced to support sending notifications after authorization |
internal/workflows/functions/providers/thand/notify.go |
Updated to handle multiple recipients in To field |
internal/providers/email/main.go |
Enhanced to support multiple recipients and improved configuration |
internal/models/provider.go |
Refactored to split provider interfaces into separate files |
internal/models/provider_rbac.go |
New file with RBAC interface and implementations |
internal/providers/*/rbac.go |
Added GetAuthorizedAccessUrl method to all providers |
Comments suppressed due to low confidence (1)
internal/workflows/functions/providers/thand/notify.go:1
- The code appends the loop variable
itemincorrectly. Line 142 should appendstr(the converted string) instead ofr(the NotifierRequest receiver).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@hughneale I've opened a new pull request, #82, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 47 out of 48 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
internal/workflows/tasks/providers/thand/authorize.go:294
- Incorrect function constant used in CallFunction. This should be
thandFunction.ThandAuthorizeFunctioninstead ofthandFunction.ThandNotifyFunctionsince this is executing authorization tasks, not notification tasks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.