Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: Add custom notifications for each site #255

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

coolusaHD
Copy link
Contributor

As described in https://github.com/orgs/upptime/discussions/930 , it would be nice to set diffrent notification for each site.

I know that the isse proposed to add that feature to send emails but for the first step this PR only adds webhooks.

Before I invest more time in that, it would be nice to know if my intensions are right.

@AnandChowdhary Do you have any ideas or comments on that ?

Currently I would change the current behaviour to only send general notifications for sites that have no custom notification type set and the custom ones for that they are configurrf

Furthermore I can imagine to refactor the update and sendNotification to make it more readable and easier to add more feature in the future.

Feel free to comment ✌️

Best @coolusaHD

@coolusaHD
Copy link
Contributor Author

@AnandChowdhary Any thoughts on this ?

@AnandChowdhary
Copy link
Member

Looks good to me! If I understand it correctly, this PR only adds support for custom webhooks right?

@coolusaHD
Copy link
Contributor Author

Currently yes but I am planning to add more.

@coolusaHD coolusaHD marked this pull request as draft October 8, 2024 09:09
add sending logic with custom overrides
@coolusaHD
Copy link
Contributor Author

@AnandChowdhary This PR is almost finished, before I change the docs I want to explain what I've done and ask for review / opinion ✌️

I refactored the sending functionality and extract each send function in his own file where the checks and the setup are also placed.
I added the rest of the notification methods to be configurable as customNotification.
Th only problem what I encountered was the override of the sms or email provider but I think it's a rare edge case when someone wants to send their sms or mail via a different provider.

Furthermore I implemented the custom action logger

@coolusaHD coolusaHD marked this pull request as ready for review October 11, 2024 08:06
@coolusaHD
Copy link
Contributor Author

@AnandChowdhary Any update on this ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants