Skip to content

add mail template command#339

Merged
majewsky merged 6 commits into
masterfrom
mail_template_render
May 4, 2026
Merged

add mail template command#339
majewsky merged 6 commits into
masterfrom
mail_template_render

Conversation

@VoigtS
Copy link
Copy Markdown
Member

@VoigtS VoigtS commented Apr 28, 2026

Includes the mail-template command which can be used to view the stringified or JSON escaped content of all templates or an individual template.

Copy link
Copy Markdown

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

Adds a new CLI surface to inspect rendered mail templates returned by the Limes admin API, to help validate template configuration.

Changes:

  • Introduce cluster mail-template command with subcommands to print all templates or individual templates.
  • Add a --json output flag for the mail-template subcommands.
  • Wire the new command into the existing cluster command tree.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
internal/cmd/mail_template.go Implements mail-template command, fetching templates from admin/mail/render and printing them (raw or JSON).
internal/cmd/flags.go Adds mailTemplateFlags with a --json boolean.
internal/cmd/cluster.go Registers the new mail-template command under cluster.

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

Comment thread internal/cmd/flags.go Outdated
Comment thread internal/cmd/flags.go Outdated
Comment thread internal/cmd/mail_template.go Outdated
Comment thread internal/cmd/flags.go Outdated
Comment thread internal/cmd/mail_template.go Outdated
@VoigtS VoigtS requested a review from majewsky May 4, 2026 11:38
VoigtS and others added 6 commits May 4, 2026 14:37
make mailTemplates struct private
adjust mailTemplateFlags comment
Co-authored-by: Stefan Majewsky <stefan.majewsky@sap.com>
@VoigtS VoigtS force-pushed the mail_template_render branch from 9404079 to 5e2b4c8 Compare May 4, 2026 12:41
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/sapcc/limesctl/internal/cmd 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/sapcc/limesctl/internal/cmd/cluster.go 0.00% (ø) 0 0 0
github.com/sapcc/limesctl/internal/cmd/mail_template.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@majewsky majewsky merged commit 29fc4f7 into master May 4, 2026
6 checks passed
@majewsky majewsky deleted the mail_template_render branch May 4, 2026 14:31
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