feat:added Slack notifications support #38
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/slack-notifs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overall seems OK. Deserves some refactoring though.
@@ -13,2 +9,2 @@"None".to_string()};fn get_discord_alert_manager_score(config: &KubePrometheusConfig) -> Option<HelmChartScore> {let (url, name) = config.alert_channel.iter().find_map(|channel| {Since we're supporting a list, shouldn't we use filter_map instead so we can handle all the instances at once?
Also this is a smell to me. All the handlers should implement the same trait. For example :
Ce serait une facon de simplifier la gestion de chacun des types ensuite. C'est plus type safe et moins error prone.
@@ -188,2 +221,4 @@}}fn discord_alert_builder(release_name: &String) -> (String, String) {Yeah, these two functions here
discord_alert_builderandslack_alert_builderhere should be implementations of a trait.The fact that their names share the same semantics is a great givaway.
Also, returning (String, String) is pretty weak. I guess there should be a type or you should build a custom type for that. Then this type can Derive Serialize.