Skip to content

Let channel subject templates wrap the base subject - #43

Merged
archlemon merged 2 commits into
mainfrom
fix/subject-wrap
Nov 14, 2026
Merged

archlemon merged 2 commits into
mainfrom
fix/subject-wrap

Conversation

@archlemon

Copy link
Copy Markdown
Member

Fixes #38 (approved: channel wraps base). Breaking (fine per owner): -s no longer bypasses channel subject templates.

channel subject -s "disk full" no -s (defaults.subject Notification from host)
[production] my-app: {{ .Subject }} (example email) [production] my-app: disk full (was disk full) [production] my-app: Notification from host (was [production] my-app: )
none disk full Notification from host

Body templates still see the final channel subject as .Subject. README subject-resolution text and template-data table updated.

Test: all four combinations above.

{{ .Subject }} in a channel subject template was always empty, and -s
bypassed channel subject templates, so the example email subject always
rendered as "[production] my-app: ".

The base subject is now -s, else the rendered defaults.subject. Channel
subject/subject_template render with the base as .Subject; channels
without one use the base as is.

Fixes #38
@archlemon archlemon added the bug Something isn't working label Nov 14, 2026
@archlemon
archlemon merged commit a2ae500 into main Nov 14, 2026
2 checks passed
@archlemon
archlemon deleted the fix/subject-wrap branch November 14, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Channel subject templates cannot use the base subject

1 participant