From 7c27fcb895f4100a2b9c431ecdf76559752eb571 Mon Sep 17 00:00:00 2001 From: TwiN Date: Tue, 8 Jul 2025 12:21:56 -0400 Subject: [PATCH] fix: Convert key to lowercase when looking up endpoint by key (#1150) --- config/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.go b/config/config.go index 608a1384..5989a2b4 100644 --- a/config/config.go +++ b/config/config.go @@ -106,7 +106,7 @@ type Config struct { func (config *Config) GetEndpointByKey(key string) *endpoint.Endpoint { for i := 0; i < len(config.Endpoints); i++ { ep := config.Endpoints[i] - if ep.Key() == key { + if ep.Key() == strings.ToLower(key) { return ep } } @@ -116,7 +116,7 @@ func (config *Config) GetEndpointByKey(key string) *endpoint.Endpoint { func (config *Config) GetExternalEndpointByKey(key string) *endpoint.ExternalEndpoint { for i := 0; i < len(config.ExternalEndpoints); i++ { ee := config.ExternalEndpoints[i] - if ee.Key() == key { + if ee.Key() == strings.ToLower(key) { return ee } } @@ -411,8 +411,8 @@ func validateAlertingConfig(alertingConfig *alerting.Config, endpoints []*endpoi alert.TypeGitea, alert.TypeGoogleChat, alert.TypeGotify, - alert.TypeHomeAssistant, - alert.TypeIlert, + alert.TypeHomeAssistant, + alert.TypeIlert, alert.TypeIncidentIO, alert.TypeJetBrainsSpace, alert.TypeMatrix,