Skip to content

Conversation

@piksel
Copy link
Member

@piksel piksel commented Jan 29, 2023

This adds the ToJSON template function to notifications, allows the template data to JSON serialized and adds a built in default JSON template (simply {{ . | ToJSON }}).

Fixes #1478 and allows for better compatibility with #1523.

@piksel piksel requested a review from simskij as a code owner January 29, 2023 15:37
@codecov
Copy link

codecov bot commented Jan 29, 2023

Codecov Report

Base: 66.20% // Head: 66.76% // Increases project coverage by +0.55% 🎉

Coverage data is based on head (1fcfd86) compared to base (14b235a).
Patch coverage: 92.15% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1542      +/-   ##
==========================================
+ Coverage   66.20%   66.76%   +0.55%     
==========================================
  Files          24       25       +1     
  Lines        2314     2365      +51     
==========================================
+ Hits         1532     1579      +47     
- Misses        682      685       +3     
- Partials      100      101       +1     
Impacted Files Coverage Δ
pkg/notifications/json.go 92.00% <92.00%> (ø)
pkg/notifications/shoutrrr.go 74.64% <100.00%> (+0.17%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@piksel piksel merged commit 547d033 into main Jan 29, 2023
@piksel piksel deleted the feat/notify-tpl-tojson branch January 29, 2023 16:10
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.

WATCHTOWER_NOTIFICATION_TEMPLATE wierd behavior

2 participants