From 369940b4277849188dfcf69a1ad2621aeae7e39d Mon Sep 17 00:00:00 2001 From: Jason Morley Date: Sat, 22 Feb 2025 12:50:40 -1000 Subject: [PATCH] fix: Support custom report subjects (#41) --- Sources/ReporterCore/Configuration.swift | 2 ++ Sources/ReporterCore/Reporter.swift | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/ReporterCore/Configuration.swift b/Sources/ReporterCore/Configuration.swift index 26d619c..5af9a64 100644 --- a/Sources/ReporterCore/Configuration.swift +++ b/Sources/ReporterCore/Configuration.swift @@ -46,6 +46,8 @@ struct Configuration: Codable { let from: User let to: [User] + let subject: String? + } struct Policy: Codable { diff --git a/Sources/ReporterCore/Reporter.swift b/Sources/ReporterCore/Reporter.swift index f2f528b..fb91508 100644 --- a/Sources/ReporterCore/Reporter.swift +++ b/Sources/ReporterCore/Reporter.swift @@ -297,7 +297,7 @@ public class Reporter { let mail = Mail( from: .init(configuration.email.from), to: configuration.email.to.map({ Mail.User($0) }), - subject: "Change Report", + subject: configuration.email.subject ?? "Change Report", text: summary, attachments: [.init(htmlContent: htmlSummary)] )