CROSSLINK-270 Send email notifications#649
Open
JanisSaldabols wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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(includingsendToandtemplateLabel) and addsend-notificationauto-actions to the returnables workflow. - Refactor scheduler pullslip emailing to use a new
broker/emailpackage and anEmailServiceabstraction. - Add
send-notificationhandling 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. |
e0c2efb to
2ea3461
Compare
f86021e to
a0dc955
Compare
jakub-id
reviewed
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.