-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(notifications): title customization #1219
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1219 +/- ##
==========================================
+ Coverage 63.00% 63.60% +0.60%
==========================================
Files 23 23
Lines 1500 1522 +22
==========================================
+ Hits 945 968 +23
+ Misses 471 470 -1
Partials 84 84
Continue to review full report at Codecov.
|
494859c
to
f27bd38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 💯 fine with merging this as-is but left a minor comment.
type StaticData struct { | ||
Title string | ||
Host string | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this naming be improved to clarify what it is? StaticData
is very generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, but it's the best way I found to describe it. It's the non-changing (static) part of the data used for notifications. It could perhaps be called StaticTemplateData
, but it's not, strictly speaking, only used for that.
Any suggestions?
f3986cb
to
2407452
Compare
This PR introduces two new flags to watchtower:
--notification-skip-title
and
--notification-title-tag <TAG>
(with a backwards compatible alias tonotification-email-subjecttag
).The
title-tag
flag works the same way as theemail-subjecttag
used to work. If supplied, it will prefix the titles for all notifications with[<TAG>]
. Since it is generic among all notifications (which support titles), it was renamed to reflect this, but using the old name still works for now. Fixes #1205Supplying the
skip-title
flag will not override thetitle
param for the shoutrrr service, so it can still be set to whatever value you want using the&title=
query parameter of the shoutrrr URL. This should in effect remove the title if no such query param is supplied. Fixes #1207This was done in a combined effort to simplify the title generation and fixing the unintended breaking changes in 1.4.0