Skip to content

Refactor thand notifier and provided email templating #81

Merged
hughneale merged 5 commits into
mainfrom
refactor-thand-notifier
Nov 4, 2025
Merged

Refactor thand notifier and provided email templating #81
hughneale merged 5 commits into
mainfrom
refactor-thand-notifier

Conversation

@hughneale
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings November 4, 2025 17:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 item incorrectly. Line 142 should append str (the converted string) instead of r (the NotifierRequest receiver).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/models/common.go
Comment thread internal/daemon/providers.go Outdated
Comment thread internal/daemon/providers.go
Comment thread internal/providers/email/main.go Outdated
Comment thread internal/workflows/tasks/providers/thand/authorize.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 4, 2025 17:26
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 4, 2025

@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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ThandAuthorizeFunction instead of thandFunction.ThandNotifyFunction since this is executing authorization tasks, not notification tasks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/workflows/tasks/providers/thand/authorize.go
@hughneale hughneale merged commit 21e0727 into main Nov 4, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants