Skip to content
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

feat(notifications): add json template #1542

Merged
merged 3 commits into from
Jan 29, 2023
Merged

feat(notifications): add json template #1542

merged 3 commits into from
Jan 29, 2023

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
1 participant