Skip to content

CROSSLINK-270 Send email notifications#649

Open
JanisSaldabols wants to merge 6 commits into
mainfrom
CROSSLINK-270
Open

CROSSLINK-270 Send email notifications#649
JanisSaldabols wants to merge 6 commits into
mainfrom
CROSSLINK-270

Conversation

@JanisSaldabols

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 29, 2026 13:13
@JanisSaldabols JanisSaldabols changed the title Crosslink 270 CROSSLINK-270 Send email notifications Jun 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for state-model-driven email notifications by introducing a new send-notification action (with parameters like recipients + template label), wiring notification auto-actions into the patron-request action runner, and refactoring SMTP/MIME email construction into a shared broker/email package used by both scheduler pullslip emailing and patron-request notifications.

Changes:

  • Extend state model / OpenAPI schemas to allow per-action params (including sendTo and templateLabel) and add send-notification auto-actions to the returnables workflow.
  • Refactor scheduler pullslip emailing to use a new broker/email package and an EmailService abstraction.
  • Add send-notification handling to patron-request action execution (borrower + lender) and add tests; bump a few Go dependencies.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
misc/state-model.json Updates schema to allow action params (including notification params).
misc/returnables.yaml Adds send-notification auto-actions for shipped/unfilled/validated states.
broker/scheduler/service/email_sender.go Refactors pullslip emailing to use broker/email and readiness checks.
broker/scheduler/service/email_sender_test.go Updates tests for the refactored email sender abstraction.
broker/scheduler/service/batch_action_test.go Adjusts batch action tests for updated email sender wiring.
broker/patron_request/service/statemodels/returnables.json Regenerates compiled returnables model with notification actions.
broker/patron_request/service/statemodel_capabilities.go Registers send-notification as a built-in action capability.
broker/patron_request/service/action.go Implements send-notification action execution + directory/patron recipient resolution.
broker/patron_request/service/action_test.go Adds tests for notification email lookup/sending and action execution paths.
broker/patron_request/service/action_mapping.go Changes auto-action extraction to retain full action definitions (incl. params).
broker/patron_request/service/action_mapping_test.go Updates mapping expectations to include notification auto-actions.
broker/oapi/open-api.yaml Extends API schema to describe action params incl. notification fields.
broker/go.mod Bumps dependency versions (oapi-codegen runtime, testcontainers, gopsutil).
broker/go.sum Updates checksums for bumped dependencies.
broker/email/email.go New shared SMTP/MIME email builder + EmailService implementation.
broker/email/email_test.go Unit tests for raw MIME message building and address joining.
broker/app/app.go Wires the new email service into patron-request actions and scheduler batch actions.

Comment thread broker/patron_request/service/action_test.go
Comment thread broker/patron_request/service/action_test.go
Comment thread broker/patron_request/service/action_test.go
Comment thread broker/patron_request/service/action_test.go
Comment thread broker/patron_request/service/action_test.go
Comment thread broker/patron_request/service/action_mapping_test.go
Comment thread broker/patron_request/service/action.go
Comment thread broker/patron_request/service/action.go
Comment thread broker/scheduler/service/email_sender.go
Comment thread broker/scheduler/service/email_sender.go
Copilot AI review requested due to automatic review settings June 30, 2026 12:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 19 out of 20 changed files in this pull request and generated 3 comments.

Comment thread broker/scheduler/service/email_sender.go
Comment thread broker/patron_request/api/api-handler.go
Comment thread broker/patron_request/service/action.go
Comment thread broker/go.mod
Copilot AI review requested due to automatic review settings July 1, 2026 09:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 18 out of 18 changed files in this pull request and generated 3 comments.

Comment thread broker/patron_request/api/api-handler.go
Comment thread broker/patron_request/service/action.go
Comment thread broker/scheduler/service/email_sender.go Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants